Skip to content

Commit

Permalink
Improve naming in filters sheet
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael-128 committed Jan 25, 2025
1 parent a0a7dc5 commit eb0f011
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ class TorrentListHelperViewModel: ObservableObject {
@Published public var sort: String = "name"
@Published public var reverse: Bool = false
@Published public var filter: String = "all"
@Published public var category: String = "None"
@Published public var tag: String = "None"
@Published public var category: String = "All"
@Published public var tag: String = "All"

@Published public var isTorrentAddView: Bool = false
@Published public var isSelectionMode: Bool = false
Expand All @@ -32,8 +32,8 @@ class TorrentListHelperViewModel: ObservableObject {

var queryItems = [URLQueryItem(name: "sort", value: sort), URLQueryItem(name: "filter", value: filter), URLQueryItem(name: "reverse", value: String(reverse))]

if category != "None" { queryItems.append(URLQueryItem(name: "category", value: category)) }
if tag != "None" { queryItems.append(URLQueryItem(name: "tag", value: tag)) }
if category != "All" { queryItems.append(URLQueryItem(name: "category", value: category)) }
if tag != "All" { queryItems.append(URLQueryItem(name: "tag", value: tag)) }

let request = qBitRequest.prepareURLRequest(path: "/api/v2/torrents/info", queryItems: queryItems)

Expand Down
4 changes: 2 additions & 2 deletions qBitControl/Views/TorrentViews/FiltersMenuView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ struct FiltersMenuView: View {

if categories.count > 1 {
Picker("Categories", selection: $category) {
Text("None").tag("None")
Text("All").tag("All")
Text("Uncategorized").tag("")
ForEach(categories, id: \.self) { theCategory in
Text(theCategory.name).tag(theCategory.name)
Expand All @@ -45,7 +45,7 @@ struct FiltersMenuView: View {

if tagsArr.count > 1 {
Picker("Tags", selection: $tag) {
Text("None").tag("None")
Text("All").tag("All")
Text("Untagged").tag("")
ForEach(tagsArr, id: \.self) {
tag1 in
Expand Down

0 comments on commit eb0f011

Please sign in to comment.