From c2fb784dbf17a156fd51836421b407fd24ae988c Mon Sep 17 00:00:00 2001 From: diamondburned Date: Thu, 18 Mar 2021 12:27:50 -0700 Subject: [PATCH] Move Columnate to Lister This commit broke Lister to add Columnate, and the method is removed from Server, because only Lister gets nested. --- cchat.go | 21 +++++++++--------- repository/gob/repository.gob | Bin 37803 -> 37802 bytes repository/main.go | 40 +++++++++++++++++----------------- 3 files changed, 30 insertions(+), 31 deletions(-) diff --git a/cchat.go b/cchat.go index 4c3097d..d154889 100644 --- a/cchat.go +++ b/cchat.go @@ -392,6 +392,16 @@ type Lister interface { // servers. This function can do IO, and the frontend should run this in a // goroutine. Servers(ServersContainer) (stop func(), err error) + // Columnate is optionally used by servers to give different nested servers its + // own nesting values. Top-level servers must start at 1. The zero-value (0) + // indicates that the server that implements this interface is inherently the + // children of its parent server. + // + // For example, in Discord, guilds can be placed in guild folders, but guilds + // and guild folders are put in the same column while guilds are actually + // children of the folders. To replicate this behavior, both guild and guild + // folders can return 1. + Columnate() int } // MemberDynamicSection represents a dynamically loaded member list section. The @@ -669,17 +679,6 @@ type Server interface { Identifier Namer - // Columnate is optionally used by servers to give different nested servers its - // own nesting values. Top-level servers must start at 1. The zero-value (0) - // indicates that the server that implements this interface is inherently the - // children of its parent server. - // - // For example, in Discord, guilds can be placed in guild folders, but guilds - // and guild folders are put in the same column while guilds are actually - // children of the folders. To replicate this behavior, both guild and guild - // folders can return 1. - Columnate() int - // Asserters. AsLister() Lister // Optional diff --git a/repository/gob/repository.gob b/repository/gob/repository.gob index 2d407ceea8121383ba5531378bbae4d79c69b078..5967e560a5f200b623216265ef4130bb6c7dc96d 100644 GIT binary patch delta 467 zcmX|+Un>M*6vpR_VR!8xZj`9Sx*&vzi`8hy+Vv+xlU0&U%e?GhXSFtLN_MX)IUm5~ zh8voUE%^XG0lAV}N>VP3Gn?F;r{|paIq&&h7Ws=Je^n41j*xZ5@vZnd&}1y;o~rPx zX`Q$7*nc?ReNzG8leV{6Cd)E1%O=w*SSAMmu5eP@RAad<1|E*%etK6e6ORrfPSXWd zQ<}bk2~jMYiBw|EHeljnKI$+%;F6h+pOQqKxBR%*^np8^R@w4qdZiqr{y||9Oyi;O zS_^)<%x@HhsYX2B^BQ{d3BWB{Ep<@Bx ztq%q24SB**2_<80dKO5|XHI}`2OLrqa>vRMPtp+c_$kzuL1MzY9l|)>jZi1L`whQ8 C3#BXo delta 470 zcmZ3roN4uPrVULjY|@+mZ(v~BJW)PddU6AI7V|&G+naw|&0`eb%FM{f@0_1kl9-v7 zTI8Erl98Xn_+kD%mkwb4gP!*qJadB!<2}02h21Z6kPUnowoRpBt zf>cHx1_p+IESLW8m>lcs#kgbh3Rfd;#vPMy2e<<{%7GayK&mHnFC!!CWJh_+$pJks z96LA}*?cmKOC}fc*#ecG3I{5MYKV%s#W=Yw!-jF&>ef{)se>|2h=dNXEF=e$$t5H z$xtWfO>_myY?=6tkx_Z_!T|ZrD_Cx@O@7NA&bfn&k=;2zC%*`!k{#mHyvYT8c0dRI z<#FKxySps0BoV9tDA>sha{EPI4