cancel cm hidden timer when active

This commit is contained in:
csf
2022-10-26 21:39:28 +09:00
parent e759b62f5d
commit 5a905174e7
3 changed files with 62 additions and 54 deletions

View File

@@ -73,7 +73,7 @@ class DesktopTabController {
int get length => state.value.tabs.length;
void add(TabInfo tab, {bool authorized = false}) {
void add(TabInfo tab) {
if (!isDesktop) return;
final index = state.value.tabs.indexWhere((e) => e.key == tab.key);
int toIndex;
@@ -87,16 +87,6 @@ class DesktopTabController {
toIndex = state.value.tabs.length - 1;
assert(toIndex >= 0);
}
if (tabType == DesktopTabType.cm) {
Future.delayed(Duration.zero, () async {
window_on_top(null);
});
if (authorized) {
Future.delayed(const Duration(seconds: 3), () {
windowManager.minimize();
});
}
}
try {
jumpTo(toIndex);
} catch (e) {