Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release v5.4.2 #1213

Merged
merged 6 commits into from
Nov 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 18 additions & 18 deletions BookPlayer.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -4154,7 +4154,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 5.4.1;
MARKETING_VERSION = 5.4.2;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = "$(BP_BUNDLE_IDENTIFIER).BookPlayerIntents";
Expand Down Expand Up @@ -4188,7 +4188,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 5.4.1;
MARKETING_VERSION = 5.4.2;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = "$(BP_BUNDLE_IDENTIFIER).BookPlayerIntents";
PRODUCT_NAME = "$(TARGET_NAME)";
Expand Down Expand Up @@ -4220,7 +4220,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 5.4.1;
MARKETING_VERSION = 5.4.2;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = "$(BP_BUNDLE_IDENTIFIER).BookPlayerIntents";
PRODUCT_NAME = "$(TARGET_NAME)";
Expand Down Expand Up @@ -4256,7 +4256,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 5.4.1;
MARKETING_VERSION = 5.4.2;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = "$(BP_BUNDLE_IDENTIFIER).watchkitapp";
Expand Down Expand Up @@ -4297,7 +4297,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 5.4.1;
MARKETING_VERSION = 5.4.2;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = "$(BP_BUNDLE_IDENTIFIER).watchkitapp";
PRODUCT_NAME = "$(TARGET_NAME)";
Expand Down Expand Up @@ -4335,7 +4335,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 5.4.1;
MARKETING_VERSION = 5.4.2;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = "$(BP_BUNDLE_IDENTIFIER).watchkitapp";
PRODUCT_NAME = "$(TARGET_NAME)";
Expand Down Expand Up @@ -4504,7 +4504,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 5.4.1;
MARKETING_VERSION = 5.4.2;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = "$(BP_BUNDLE_IDENTIFIER).BookPlayerWidgetUI";
Expand Down Expand Up @@ -4542,7 +4542,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 5.4.1;
MARKETING_VERSION = 5.4.2;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = "$(BP_BUNDLE_IDENTIFIER).BookPlayerWidgetUI";
PRODUCT_NAME = "$(TARGET_NAME)";
Expand Down Expand Up @@ -4578,7 +4578,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 5.4.1;
MARKETING_VERSION = 5.4.2;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = "$(BP_BUNDLE_IDENTIFIER).BookPlayerWidgetUI";
PRODUCT_NAME = "$(TARGET_NAME)";
Expand Down Expand Up @@ -4731,7 +4731,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 5.4.1;
MARKETING_VERSION = 5.4.2;
PRODUCT_BUNDLE_IDENTIFIER = "$(BP_BUNDLE_IDENTIFIER)";
PRODUCT_NAME = BookPlayer;
PROVISIONING_PROFILE_SPECIFIER = "$(BP_PROVISIONING_MAIN)";
Expand Down Expand Up @@ -4769,7 +4769,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 5.4.1;
MARKETING_VERSION = 5.4.2;
PRODUCT_BUNDLE_IDENTIFIER = "$(BP_BUNDLE_IDENTIFIER)";
PRODUCT_NAME = BookPlayer;
PROVISIONING_PROFILE_SPECIFIER = "$(BP_PROVISIONING_MAIN)";
Expand Down Expand Up @@ -4991,7 +4991,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 5.4.1;
MARKETING_VERSION = 5.4.2;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = "$(BP_BUNDLE_IDENTIFIER).watchkitapp.widgets";
Expand Down Expand Up @@ -5029,7 +5029,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 5.4.1;
MARKETING_VERSION = 5.4.2;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = "$(BP_BUNDLE_IDENTIFIER).watchkitapp.widgets";
PRODUCT_NAME = "$(TARGET_NAME)";
Expand Down Expand Up @@ -5065,7 +5065,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 5.4.1;
MARKETING_VERSION = 5.4.2;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = "$(BP_BUNDLE_IDENTIFIER).watchkitapp.widgets";
PRODUCT_NAME = "$(TARGET_NAME)";
Expand Down Expand Up @@ -5104,7 +5104,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 5.4.1;
MARKETING_VERSION = 5.4.2;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = "$(BP_BUNDLE_IDENTIFIER).BookPlayerShareExtension";
Expand Down Expand Up @@ -5144,7 +5144,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 5.4.1;
MARKETING_VERSION = 5.4.2;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = "$(BP_BUNDLE_IDENTIFIER).BookPlayerShareExtension";
PRODUCT_NAME = "$(TARGET_NAME)";
Expand Down Expand Up @@ -5182,7 +5182,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 5.4.1;
MARKETING_VERSION = 5.4.2;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = "$(BP_BUNDLE_IDENTIFIER).BookPlayerShareExtension";
PRODUCT_NAME = "$(TARGET_NAME)";
Expand Down Expand Up @@ -5274,7 +5274,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 5.4.1;
MARKETING_VERSION = 5.4.2;
PRODUCT_BUNDLE_IDENTIFIER = "$(BP_BUNDLE_IDENTIFIER)";
PRODUCT_NAME = BookPlayer;
PROVISIONING_PROFILE_SPECIFIER = "$(BP_PROVISIONING_MAIN)";
Expand Down
2 changes: 2 additions & 0 deletions BookPlayer/Base.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -319,3 +319,5 @@ We're working hard on providing a seamless experience, if possible, please conta
"Rewind ${interval}" = "Rewind ${interval}";
"settings_lock_orientation_title" = "Orientation Locked";
"more_title" = "More";
"repeat_turn_on_title" = "Turn on Repeat for this book";
"repeat_turn_off_title" = "Turn off Repeat for this book";
4 changes: 4 additions & 0 deletions BookPlayer/Coordinators/Coordinator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ extension AlertPresenter where Self: Coordinator {
flow.navigationController.showAlert(title, message: message, completion: completion)
}

func showAlert(_ content: BPAlertContent) {
flow.navigationController.showAlert(content)
}

func showLoader() {
LoadingUtils.loadAndBlock(in: flow.navigationController)
}
Expand Down
28 changes: 21 additions & 7 deletions BookPlayer/Coordinators/DataInitializerCoordinator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -74,17 +74,31 @@ class DataInitializerCoordinator: BPLogger {
\(error.localizedDescription)

Error Domain
\(error.domain)
\(error.domain) (\(error.code)

Additional Info
\(error.userInfo)
"""
alertPresenter.showAlert(
"error_title".localized,
message: errorDescription
) {
fatalError("Unresolved error \(error.localizedDescription)")
}
alertPresenter.showAlert(BPAlertContent(
title: "error_title".localized,
message: errorDescription,
style: .alert,
actionItems: [
BPActionItem(
title: "ok_button".localized,
handler: {
fatalError("Unresolved error \(error.domain) (\(error.code)): \(error.localizedDescription)")
}
),
.init(
title: "Reset and recover database",
style: .destructive,
handler: {
self.recoverLibraryFromFailedMigration()
}
)
]
))
}
}
}
Expand Down
4 changes: 4 additions & 0 deletions BookPlayer/Coordinators/MainCoordinator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,10 @@ extension MainCoordinator: AlertPresenter {
navigationController.showAlert(title, message: message, completion: completion)
}

func showAlert(_ content: BPAlertContent) {
navigationController.showAlert(content)
}

func showLoader() {
LoadingUtils.loadAndBlock(in: navigationController)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ class ItemDetailsFormViewModel: ObservableObject {
@Published var author: String
/// Artwork image
@Published var selectedImage: UIImage?
/// Progress of the current item
let progress: Double
/// Original item title
var titlePlaceholder: String
/// Original item author
Expand All @@ -37,6 +39,7 @@ class ItemDetailsFormViewModel: ObservableObject {
self.titlePlaceholder = item.title
self.author = item.details
self.authorPlaceholder = item.details
self.progress = item.progress
self.originalFileName = item.originalFileName
self.showAuthor = item.type == .book
self.originalImageDataProvider = ArtworkService.getArtworkProvider(for: item.relativePath)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,14 @@ struct ItemDetailsForm: View {
Section {
EmptyView()
} footer: {
Text(viewModel.originalFileName)
.font(Font(Fonts.body))
.foregroundColor(themeViewModel.secondaryColor)
VStack(alignment: .leading) {
Text(viewModel.originalFileName)
.font(Font(Fonts.body))
.foregroundColor(themeViewModel.secondaryColor)
Text("\(Int(viewModel.progress * 100))%")
.font(Font(Fonts.body))
.foregroundColor(themeViewModel.secondaryColor)
}
}
}
.onChange(of: viewModel.selectedImage, perform: { _ in
Expand Down
6 changes: 5 additions & 1 deletion BookPlayer/Library/ItemList Screen/ItemListViewModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1372,7 +1372,11 @@ extension ItemListViewModel: AlertPresenter {
)
))
}


func showAlert(_ content: BPAlertContent) {
sendEvent(.showAlert(content: content))
}

func showLoader() {
sendEvent(.showLoader(flag: true))
}
Expand Down
11 changes: 11 additions & 0 deletions BookPlayer/Player/Player Screen/PlayerViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -604,6 +604,17 @@ extension PlayerViewController {
)
)

actionSheet.addAction(
UIAlertAction(
title: self.viewModel.isRepeatEnabled()
? "repeat_turn_off_title".localized : "repeat_turn_on_title".localized,
style: .default,
handler: { [weak self] _ in
self?.viewModel.handleEnableRepeat()
}
)
)

actionSheet.addAction(UIAlertAction(title: "cancel_button".localized, style: .cancel, handler: nil))

if let popoverPresentationController = actionSheet.popoverPresentationController {
Expand Down
Loading