From 62618945605ed2584c014a84ea46dcbb45924cd7 Mon Sep 17 00:00:00 2001 From: Liang Ding Date: Wed, 9 Nov 2022 19:52:30 +0800 Subject: [PATCH] =?UTF-8?q?:art:=20=E8=B0=83=E6=95=B4=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E5=90=8C=E6=AD=A5=E6=8E=A5=E5=85=A5=E7=AC=AC=E4=B8=89=E6=96=B9?= =?UTF-8?q?=E5=AD=98=E5=82=A8=E6=9C=8D=E5=8A=A1=20https://github.com/siyua?= =?UTF-8?q?n-note/siyuan/issues/6530?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- kernel/model/sync.go | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/kernel/model/sync.go b/kernel/model/sync.go index b783a0904..8a1ee28dd 100644 --- a/kernel/model/sync.go +++ b/kernel/model/sync.go @@ -378,14 +378,21 @@ func ListCloudSyncDir() (syncDirs []*Sync, hSize string, err error) { for _, d := range dirs { dirSize := d.Size - syncDirs = append(syncDirs, &Sync{ + sync := &Sync{ Size: dirSize, - HSize: humanize.Bytes(uint64(dirSize)), + HSize: "-", Updated: d.Updated, CloudName: d.Name, - }) + } + if conf.ProviderSiYuan == Conf.Sync.Provider { + sync.HSize = humanize.Bytes(uint64(dirSize)) + } + syncDirs = append(syncDirs, sync) + } + hSize = "-" + if conf.ProviderSiYuan == Conf.Sync.Provider { + hSize = humanize.Bytes(uint64(size)) } - hSize = humanize.Bytes(uint64(size)) return }