From b6ea0110924698cd474da38034b818eba5dec03a Mon Sep 17 00:00:00 2001 From: Michael-128 Date: Sat, 9 Dec 2023 23:55:18 +0100 Subject: [PATCH] Cleaned code --- qBitControl.xcworkspace/contents.xcworkspacedata | 10 ++++++++++ .../xcshareddata/IDEWorkspaceChecks.plist | 8 ++++++++ qBitControl/TorrentView/TorrentListView.swift | 14 +------------- 3 files changed, 19 insertions(+), 13 deletions(-) create mode 100644 qBitControl.xcworkspace/contents.xcworkspacedata create mode 100644 qBitControl.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist diff --git a/qBitControl.xcworkspace/contents.xcworkspacedata b/qBitControl.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..0b6c81c --- /dev/null +++ b/qBitControl.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/qBitControl.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/qBitControl.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/qBitControl.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/qBitControl/TorrentView/TorrentListView.swift b/qBitControl/TorrentView/TorrentListView.swift index 5addb42..ee494c5 100644 --- a/qBitControl/TorrentView/TorrentListView.swift +++ b/qBitControl/TorrentView/TorrentListView.swift @@ -124,21 +124,9 @@ struct TorrentListView: View { } func getTorrents() { - if(scenePhase != .active) { - //print("App inactive") + if(scenePhase != .active || isFilterView || isTorrentAddView) { return } - if(isFilterView) { - //print("Filter view active") - return - } - if(isTorrentAddView) { - //print("Torrent view active") - return - } - - //print("Fetching torrents") - //print(scenePhase) var queryItems = [URLQueryItem(name: "sort", value: sort), URLQueryItem(name: "filter", value: filter), URLQueryItem(name: "reverse", value: String(reverse))]