diff --git a/Hanami.xcodeproj/project.pbxproj b/Hanami.xcodeproj/project.pbxproj index d661c84..80aca51 100644 --- a/Hanami.xcodeproj/project.pbxproj +++ b/Hanami.xcodeproj/project.pbxproj @@ -1186,7 +1186,6 @@ CODE_SIGN_ENTITLEMENTS = Hanami/Hanami.entitlements; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 5; DEVELOPMENT_ASSET_PATHS = "\"Hanami/Preview Content\""; DEVELOPMENT_TEAM = HJ9678T652; ENABLE_PREVIEWS = YES; @@ -1207,7 +1206,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 0.22; + MARKETING_VERSION = 0.22.1; PRODUCT_BUNDLE_IDENTIFIER = moe.mkpwnz.Hanami; PRODUCT_NAME = "Hanami - Manga Reader"; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -1227,7 +1226,6 @@ CODE_SIGN_ENTITLEMENTS = Hanami/Hanami.entitlements; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 5; DEVELOPMENT_ASSET_PATHS = "\"Hanami/Preview Content\""; DEVELOPMENT_TEAM = HJ9678T652; ENABLE_PREVIEWS = YES; @@ -1248,7 +1246,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 0.22; + MARKETING_VERSION = 0.22.1; PRODUCT_BUNDLE_IDENTIFIER = moe.mkpwnz.Hanami; PRODUCT_NAME = "Hanami - Manga Reader"; PROVISIONING_PROFILE_SPECIFIER = ""; diff --git a/Hanami.xcodeproj/project.xcworkspace/xcuserdata/oolxg.xcuserdatad/UserInterfaceState.xcuserstate b/Hanami.xcodeproj/project.xcworkspace/xcuserdata/oolxg.xcuserdatad/UserInterfaceState.xcuserstate index 5b36194..06a714a 100644 Binary files a/Hanami.xcodeproj/project.xcworkspace/xcuserdata/oolxg.xcuserdatad/UserInterfaceState.xcuserstate and b/Hanami.xcodeproj/project.xcworkspace/xcuserdata/oolxg.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/Hanami/App/Core/Component/VerticalReaderView.swift b/Hanami/App/Core/Component/VerticalReaderView.swift index b7bc686..5b41cc0 100644 --- a/Hanami/App/Core/Component/VerticalReaderView.swift +++ b/Hanami/App/Core/Component/VerticalReaderView.swift @@ -18,7 +18,6 @@ struct VerticalReaderView: View { // MARK: - END scroll view declaration props @State private var timeOut: CGFloat = 0.3 - @State private var pages: IdentifiedArrayOf private struct Page: Identifiable { @@ -35,7 +34,7 @@ struct VerticalReaderView: View { var body: some View { GeometryReader { geo in - ScrollView(showsIndicators: false) { + ScrollView(showsIndicators: true) { LazyVStack { ForEach(pages.indices, id: \.self) { i in listCell(i) @@ -66,9 +65,7 @@ struct VerticalReaderView: View { } .background(Color.theme.background) .offset { rect in - if startOffset != rect.minY { - startOffset = rect.minY - } + startOffset = rect.minY } .onReceive(Timer.publish(every: 0.01, on: .main, in: .default).autoconnect()) { _ in // 0.6 - delay after which indicator will be hidden @@ -114,42 +111,34 @@ struct VerticalReaderView: View { .fill(.clear) .frame(width: 2, height: scrollerHeight) .overlay(alignment: .trailing) { - HStack(spacing: 2) { - Image(systemName: "bubble.middle.bottom.fill") - .resizable() - .renderingMode(.template) - .scaledToFit() - .foregroundStyle(.ultraThinMaterial) - .frame(width: 45, height: 45) - .rotationEffect(.init(degrees: -90)) - .overlay { - if let last = pages.last(where: { $0.rect.minY < $0.rect.minY / 2 }) { - Text("\(last.index + 1)") - .fontWeight(.black) - .foregroundColor(.white) - .offset(x: -4) - } else { - Text("1") - .fontWeight(.black) - .foregroundColor(.white) - .offset(x: -4) - } + Image(systemName: "bubble.middle.bottom.fill") + .resizable() + .renderingMode(.template) + .scaledToFit() + .foregroundStyle(.ultraThinMaterial) + .frame(width: 45, height: 45) + .rotationEffect(.init(degrees: -90)) + .overlay { + if let last = pages.last(where: { $0.rect.minY < $0.rect.minY / 2 }) { + Text("\(last.index + 1)") + .fontWeight(.black) + .foregroundColor(.white) + .offset(x: -4) + } else { + Text("1") + .fontWeight(.black) + .foregroundColor(.white) + .offset(x: -4) } - .environment(\.colorScheme, .dark) - .offset(x: hideIndicatorLabel ? 65 : 0) - .animation( - .interactiveSpring(response: 0.5, dampingFraction: 0.6, blendDuration: 0.6), - value: hideIndicatorLabel - ) - - RoundedRectangle(cornerRadius: 6) - .foregroundStyle(.ultraThinMaterial) - .opacity(hideIndicatorLabel ? 0 : 1) - .animation(.linear(duration: 0.2), value: hideIndicatorLabel) - .frame(width: 4, height: 40) - } + } + .environment(\.colorScheme, .dark) + .offset(x: hideIndicatorLabel ? 65 : 0) + .animation( + .interactiveSpring(response: 0.5, dampingFraction: 0.6, blendDuration: 0.6), + value: hideIndicatorLabel + ) } - .padding(.trailing, 1) + .padding(.trailing, 6) .offset(y: indicatorOffset) .animation(.linear, value: indicatorOffset) } diff --git a/Hanami/App/Core/Manga/Offline/OfflineMangaView.swift b/Hanami/App/Core/Manga/Offline/OfflineMangaView.swift index 629df42..2e8c77a 100644 --- a/Hanami/App/Core/Manga/Offline/OfflineMangaView.swift +++ b/Hanami/App/Core/Manga/Offline/OfflineMangaView.swift @@ -34,7 +34,7 @@ struct OfflineMangaView: View { currentPageIndex = state.pagesState?.currentPageIndex coverArtPath = state.coverArtPath selectedTab = state.selectedTab - lastReadChapterAvailable = state.lastReadChapter != nil + lastReadChapterAvailable = state.lastReadChapter != nil && state.pagesState != nil } } diff --git a/Hanami/App/Core/Manga/Online/OnlineMangaView.swift b/Hanami/App/Core/Manga/Online/OnlineMangaView.swift index 0f6d0f4..cfaa70d 100644 --- a/Hanami/App/Core/Manga/Online/OnlineMangaView.swift +++ b/Hanami/App/Core/Manga/Online/OnlineMangaView.swift @@ -43,7 +43,7 @@ struct OnlineMangaView: View { allCoverArtURLs = state.croppedCoverArtURLs allCoverArtsInfo = state.allCoverArtsInfo statistics = state.statistics - lastReadChapterAvailable = state.lastReadChapterID != nil + lastReadChapterAvailable = state.lastReadChapterID != nil && state.pagesState != nil } } diff --git a/Hanami/App/Core/Search/SearchFeature.swift b/Hanami/App/Core/Search/SearchFeature.swift index a763271..de542db 100644 --- a/Hanami/App/Core/Search/SearchFeature.swift +++ b/Hanami/App/Core/Search/SearchFeature.swift @@ -130,19 +130,13 @@ struct SearchFeature: ReducerProtocol { return .task { .cancelSearchButtonTapped } } - let selectedTags = state.filtersState.allTags.filter { $0.state != .notSelected } - let selectedPublicationDemographic = state.filtersState.publicationDemographics - .filter { $0.state != .notSelected } - let selectedContentRatings = state.filtersState.contentRatings.filter { $0.state != .notSelected } - let selectedMangaStatuses = state.filtersState.mangaStatuses.filter { $0.state != .notSelected } - let searchParams = SearchParams( searchQuery: state.searchText, resultsCount: state.resultsCount, - tags: selectedTags, - publicationDemographic: selectedPublicationDemographic, - contentRatings: selectedContentRatings, - mangaStatuses: selectedMangaStatuses, + tags: state.filtersState.allTags, + publicationDemographic: state.filtersState.publicationDemographics, + contentRatings: state.filtersState.contentRatings, + mangaStatuses: state.filtersState.mangaStatuses, sortOption: state.searchSortOption, sortOptionOrder: state.searchSortOptionOrder )