🎨 Improve data repo index purging prompt
This commit is contained in:
parent
ea066c2a38
commit
fac371dd38
3 changed files with 12 additions and 8 deletions
|
@ -50,7 +50,7 @@ require (
|
|||
github.com/rqlite/sql v0.0.0-20221103124402-8f9ff0ceb8f0
|
||||
github.com/sashabaranov/go-openai v1.17.8
|
||||
github.com/shirou/gopsutil/v3 v3.23.10
|
||||
github.com/siyuan-note/dejavu v0.0.0-20231125082301-edddcb1de16f
|
||||
github.com/siyuan-note/dejavu v0.0.0-20231127091012-9956d20ef85f
|
||||
github.com/siyuan-note/encryption v0.0.0-20220713091850-5ecd92177b75
|
||||
github.com/siyuan-note/eventbus v0.0.0-20230804030110-cf250f838c80
|
||||
github.com/siyuan-note/filelock v0.0.0-20231107122348-6ed75b0b525a
|
||||
|
@ -78,7 +78,7 @@ require (
|
|||
github.com/andybalholm/brotli v1.0.6 // indirect
|
||||
github.com/andybalholm/cascadia v1.3.2 // indirect
|
||||
github.com/asaskevich/EventBus v0.0.0-20200907212545-49d423059eef // indirect
|
||||
github.com/aws/aws-sdk-go v1.48.3 // indirect
|
||||
github.com/aws/aws-sdk-go v1.48.4 // indirect
|
||||
github.com/bytedance/sonic v1.10.2 // indirect
|
||||
github.com/cespare/xxhash/v2 v2.2.0 // indirect
|
||||
github.com/chenzhuoyu/base64x v0.0.0-20230717121745-296ad89f973d // indirect
|
||||
|
|
|
@ -49,8 +49,8 @@ github.com/araddon/dateparse v0.0.0-20210429162001-6b43995a97de h1:FxWPpzIjnTlhP
|
|||
github.com/araddon/dateparse v0.0.0-20210429162001-6b43995a97de/go.mod h1:DCaWoUhZrYW9p1lxo/cm8EmUOOzAPSEZNGF2DK1dJgw=
|
||||
github.com/asaskevich/EventBus v0.0.0-20200907212545-49d423059eef h1:2JGTg6JapxP9/R33ZaagQtAM4EkkSYnIAlOG5EI8gkM=
|
||||
github.com/asaskevich/EventBus v0.0.0-20200907212545-49d423059eef/go.mod h1:JS7hed4L1fj0hXcyEejnW57/7LCetXggd+vwrRnYeII=
|
||||
github.com/aws/aws-sdk-go v1.48.3 h1:btYjT+opVFxUbRz+qSCjJe07cdX82BHmMX/FXYmoL7g=
|
||||
github.com/aws/aws-sdk-go v1.48.3/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk=
|
||||
github.com/aws/aws-sdk-go v1.48.4 h1:HS2L7ynVhkcRrQRro9CLJZ/xLRb4UOzDEfPzgevZwXM=
|
||||
github.com/aws/aws-sdk-go v1.48.4/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk=
|
||||
github.com/bytedance/sonic v1.5.0/go.mod h1:ED5hyg4y6t3/9Ku1R6dU/4KyJ48DZ4jPhfY1O2AihPM=
|
||||
github.com/bytedance/sonic v1.10.0-rc/go.mod h1:ElCzW+ufi8qKqNW0FY314xriJhyJhuoJ3gFZdAHF7NM=
|
||||
github.com/bytedance/sonic v1.10.2 h1:GQebETVBxYB7JGWJtLBi07OVzWwt+8dWA00gEVW2ZFE=
|
||||
|
@ -356,10 +356,8 @@ github.com/shopspring/decimal v1.3.1/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFR
|
|||
github.com/shurcooL/gofontwoff v0.0.0-20181114050219-180f79e6909d h1:lvCTyBbr36+tqMccdGMwuEU+hjux/zL6xSmf5S9ITaA=
|
||||
github.com/shurcooL/gofontwoff v0.0.0-20181114050219-180f79e6909d/go.mod h1:05UtEgK5zq39gLST6uB0cf3NEHjETfB4Fgr3Gx5R9Vw=
|
||||
github.com/simplereach/timeutils v1.2.0/go.mod h1:VVbQDfN/FHRZa1LSqcwo4kNZ62OOyqLLGQKYB3pB0Q8=
|
||||
github.com/siyuan-note/dejavu v0.0.0-20231124091823-9b5765d14aeb h1:MJ7XvdmgaMqyYw0y0uHyRQTjhXIvRq8Q9bDnhLK4GEE=
|
||||
github.com/siyuan-note/dejavu v0.0.0-20231124091823-9b5765d14aeb/go.mod h1:qt8rUiTbSfM9+kilENizIB4pwido3BJd571GQkTv4XU=
|
||||
github.com/siyuan-note/dejavu v0.0.0-20231125082301-edddcb1de16f h1:RG6ap1PnZIPXVUFmCw/bxLiX6o/VGZwRjmSxBPQDXfE=
|
||||
github.com/siyuan-note/dejavu v0.0.0-20231125082301-edddcb1de16f/go.mod h1:qt8rUiTbSfM9+kilENizIB4pwido3BJd571GQkTv4XU=
|
||||
github.com/siyuan-note/dejavu v0.0.0-20231127091012-9956d20ef85f h1:w7QkXyd3KG/T5o8YEIujKUxcw7m7foMDb9RlE76owyc=
|
||||
github.com/siyuan-note/dejavu v0.0.0-20231127091012-9956d20ef85f/go.mod h1:qt8rUiTbSfM9+kilENizIB4pwido3BJd571GQkTv4XU=
|
||||
github.com/siyuan-note/encryption v0.0.0-20220713091850-5ecd92177b75 h1:Bi7/7f29LW+Fm0cHc0J1NO1cZqyJwljSWVmfOqVZgaE=
|
||||
github.com/siyuan-note/encryption v0.0.0-20220713091850-5ecd92177b75/go.mod h1:H8fyqqAbp9XreANjeSbc72zEdFfKTXYN34tc1TjZwtw=
|
||||
github.com/siyuan-note/eventbus v0.0.0-20230804030110-cf250f838c80 h1:XghjHKJd+SiL0DkGYFVC+UGUDFtnR4v9gkAbPeh9Eq8=
|
||||
|
|
|
@ -1491,6 +1491,12 @@ func indexRepoBeforeCloudSync(repo *dejavu.Repo) (beforeIndex, afterIndex *entit
|
|||
go func() {
|
||||
util.WaitForUILoaded()
|
||||
time.Sleep(3 * time.Second)
|
||||
|
||||
if indexCount, _ := repo.CountIndexes(); 128 > indexCount {
|
||||
// 快照数量较少时不推送提示
|
||||
return
|
||||
}
|
||||
|
||||
util.PushMsg(Conf.language(218), 24000)
|
||||
promotedPurgeDataRepo = true
|
||||
}()
|
||||
|
|
Loading…
Add table
Reference in a new issue