feat: 下载时若存在数据丢失风险则弹窗提示;服务端增加占用信息查看功能
This commit is contained in:
+10
-2
@@ -105,6 +105,7 @@ class _MyHomePageState extends State<MyHomePage> {
|
||||
IconButton(
|
||||
onPressed: () {
|
||||
loadCloudArchives();
|
||||
loadLocalStatus();
|
||||
},
|
||||
icon: Icon(Icons.refresh_outlined),
|
||||
),
|
||||
@@ -210,9 +211,16 @@ class _MyHomePageState extends State<MyHomePage> {
|
||||
return InkWell(
|
||||
onTap: cloudModifiedTimeTs == null
|
||||
? null
|
||||
: () {
|
||||
: () async {
|
||||
if (syncItemConfig != null) {
|
||||
download(context, syncItemConfig, cloudArchives.sorted.first);
|
||||
if (cloudModifiedTimeTs != null &&
|
||||
localModifiedTime != null &&
|
||||
localModifiedTime.millisecondsSinceEpoch > cloudModifiedTimeTs) {
|
||||
if (await UploadConfirmDialog.show(context) != true) return;
|
||||
}
|
||||
if (context.mounted) {
|
||||
download(context, syncItemConfig, cloudArchives.sorted.first);
|
||||
}
|
||||
}
|
||||
},
|
||||
onLongPress: cloudModifiedTimeTs == null
|
||||
|
||||
Reference in New Issue
Block a user