don't use Offstage as widget of animated loading, reuse refresh as

loading

Signed-off-by: 21pages <pages21@163.com>
This commit is contained in:
21pages
2023-08-18 12:52:50 +08:00
parent d56356e595
commit 24e6b54650
5 changed files with 28 additions and 102 deletions

View File

@@ -59,7 +59,6 @@ class AbModel {
if (!gFFI.userModel.isLogin) return;
if (abLoading.value) return;
if (!force && initialized) return;
DateTime startTime = DateTime.now();
if (pushError.isNotEmpty) {
try {
// push to retry
@@ -120,14 +119,7 @@ class AbModel {
}
}
} finally {
var ms =
(Duration(milliseconds: 300) - DateTime.now().difference(startTime))
.inMilliseconds;
ms = ms > 0 ? ms : 0;
Future.delayed(Duration(milliseconds: ms), () {
abLoading.value = false;
});
abLoading.value = false;
initialized = true;
_syncAllFromRecent = true;
_timerCounter = 0;