Skip to content

Commit

Permalink
Removed deprecated and also done #4
Browse files Browse the repository at this point in the history
  • Loading branch information
oolxg committed Jun 6, 2023
1 parent 3ae7873 commit 56b2bdb
Show file tree
Hide file tree
Showing 9 changed files with 15 additions and 13 deletions.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ struct OfflineMangaFeature: ReducerProtocol {
var lastReadChapter: CoreDataChapterDetailsEntry?

// MARK: - Props for MangaReadingView
@BindableState var isUserOnReadingView = false
@BindingState var isUserOnReadingView = false

var mangaReadingViewState: OfflineMangaReadingFeature.State? {
didSet { isUserOnReadingView = mangaReadingViewState.hasValue }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ struct OnlineMangaFeature: ReducerProtocol {
// MARK: END Props for view

// MARK: - Props for MangaReadingView
@BindableState var isUserOnReadingView = false
@BindingState var isUserOnReadingView = false
var mangaReadingViewState: OnlineMangaReadingFeature.State? {
didSet { isUserOnReadingView = mangaReadingViewState.hasValue }
}
Expand All @@ -49,7 +49,7 @@ struct OnlineMangaFeature: ReducerProtocol {
// MARK: - Props for inner states/views
var authorViewState: AuthorFeature.State?
var chapterLoaderState: MangaChapterLoaderFeature.State?
@BindableState var showAuthorView = false
@BindingState var showAuthorView = false
// MARK: END Props for inner states/views

// MARK: - Behavior props
Expand Down
2 changes: 1 addition & 1 deletion Hanami/App/Core/MangaThumbnail/MangaThumbnailFeature.swift
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ struct MangaThumbnailFeature: ReducerProtocol {
}

var online: Bool { onlineMangaState.hasValue }
@BindableState var navigationLinkActive = false
@BindingState var navigationLinkActive = false
var id: UUID { manga.id }
}

Expand Down
2 changes: 1 addition & 1 deletion Hanami/App/Core/Search/Filter/FiltersView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ extension FiltersView {

Spacer()

if !viewStore.state[keyPath: path].filter { $0.state != .notSelected }.isEmpty {
if !viewStore.state[keyPath: path].filter({ $0.state != .notSelected }).isEmpty {
Circle()
.frame(width: 10, height: 10)
.foregroundColor(.theme.green)
Expand Down
8 changes: 4 additions & 4 deletions Hanami/App/Core/Search/SearchFeature.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ struct SearchFeature: ReducerProtocol {
var searchResultsFetched = false
var isLoading = false

@BindableState var searchSortOption = FiltersFeature.QuerySortOption.relevance
@BindableState var searchSortOptionOrder = FiltersFeature.QuerySortOption.Order.desc
@BindableState var resultsCount = 10
@BindingState var searchSortOption = FiltersFeature.QuerySortOption.relevance
@BindingState var searchSortOptionOrder = FiltersFeature.QuerySortOption.Order.desc
@BindingState var resultsCount = 10

@BindableState var searchText = ""
@BindingState var searchText = ""

var lastSuccessfulRequestParams: SearchParams?

Expand Down
2 changes: 1 addition & 1 deletion Hanami/App/Core/Settings/SettingsFeature.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import Nuke

struct SettingsFeature: ReducerProtocol {
struct State: Equatable {
@BindableState var config = SettingsConfig(
@BindingState var config = SettingsConfig(
autolockPolicy: .never,
blurRadius: Defaults.Security.minBlurRadius,
useHigherQualityImagesForOnlineReading: false,
Expand Down
2 changes: 1 addition & 1 deletion Hanami/Model/WebAPI/ChapterDetails.swift
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ extension ChapterDetails {
]

if let translatedLanguage = attributes.translatedLanguage {
return flags[translatedLanguage] ?? ""
return flags[translatedLanguage, default: ""]
}

return ""
Expand Down
6 changes: 4 additions & 2 deletions Hanami/Tools/ISO639-1.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@ enum ISO639Language: String {
case hi, hu, fa, fr, it
case jp = "ja"
case jpRo = "ja-ro"
case ko, mn, ms, nl, ru
case ko, mn, ms, nl
case ptBr = "pt-br"
case vi, th, uk, zh
case ru, vi, th, tr, uk
case zh
case zhRo = "zh-ro"
// swiftlint:enable identifier_name
}
Expand Down Expand Up @@ -48,6 +49,7 @@ extension ISO639Language {
case .mn: return "Mongolian"
case .fa: return "Persian"
case .vi: return "Vietnamese"
case .tr: return "Turkish"
case .ru: return "Russian"
case .es: return "Spanish, Castilian"
case .th: return "Thai"
Expand Down

0 comments on commit 56b2bdb

Please sign in to comment.