Merge pull request #3557 from omnivore-app/fix/ios-ipad-issues

iOS ipad issues
This commit is contained in:
Jackson Harper
2024-02-23 11:21:58 +08:00
committed by GitHub
5 changed files with 38 additions and 19 deletions

View File

@ -1389,7 +1389,7 @@
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 12.0;
MARKETING_VERSION = 1.44.0;
MARKETING_VERSION = 1.45.0;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = app.omnivore.app;
@ -1424,7 +1424,7 @@
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 12.0;
MARKETING_VERSION = 1.44.0;
MARKETING_VERSION = 1.45.0;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = app.omnivore.app;
PRODUCT_NAME = "$(TARGET_NAME)";
@ -1479,7 +1479,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.44.0;
MARKETING_VERSION = 1.45.0;
PRODUCT_BUNDLE_IDENTIFIER = app.omnivore.app;
PRODUCT_NAME = Omnivore;
PROVISIONING_PROFILE_SPECIFIER = "";
@ -1820,7 +1820,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.44.0;
MARKETING_VERSION = 1.45.0;
PRODUCT_BUNDLE_IDENTIFIER = app.omnivore.app;
PRODUCT_NAME = Omnivore;
PROVISIONING_PROFILE_SPECIFIER = "";

View File

@ -530,8 +530,13 @@ struct AnimatingCellHeight: AnimatableModifier {
)
} else {
HomeFeedGridView(
listTitle: $listTitle,
isListScrolled: $isListScrolled,
prefersListLayout: $prefersListLayout,
isEditMode: $isEditMode,
selection: $selection,
viewModel: viewModel,
isListScrolled: $isListScrolled
showFeatureCards: showFeatureCards
)
}
}.sheet(isPresented: $viewModel.showLabelsSheet) {
@ -574,10 +579,6 @@ struct AnimatingCellHeight: AnimatableModifier {
.dynamicTypeSize(.small ... .accessibility1)
}
func menuItems(for item: Models.LibraryItem) -> some View {
libraryItemMenu(dataService: dataService, viewModel: viewModel, item: item)
}
var featureCard: some View {
VStack(spacing: 0) {
if Color.isDarkMode {
@ -745,7 +746,7 @@ struct AnimatingCellHeight: AnimatableModifier {
.listRowSeparatorTint(Color.thBorderColor)
.listRowInsets(.init(top: 0, leading: horizontalInset, bottom: 10, trailing: horizontalInset))
.contextMenu {
menuItems(for: item)
libraryItemMenu(dataService: dataService, viewModel: viewModel, item: item)
}
.swipeActions(edge: .leading, allowsFullSwipe: true) {
if let listConfig = viewModel.currentListConfig {
@ -938,11 +939,20 @@ struct AnimatingCellHeight: AnimatableModifier {
@EnvironmentObject var dataService: DataService
@EnvironmentObject var audioController: AudioController
@State var isContextMenuOpen = false
@Binding var listTitle: String
@Binding var isListScrolled: Bool
@Binding var prefersListLayout: Bool
@Binding var isEditMode: EditMode
@State private var showHideFeatureAlert = false
@Binding var selection: Set<String>
@ObservedObject var viewModel: HomeFeedViewModel
@Binding var isListScrolled: Bool
let showFeatureCards: Bool
@State var shouldScrollToTop = false
@State var topItem: Models.LibraryItem?
@ObservedObject var networkMonitor = NetworkMonitor()
func contextMenuActionHandler(item: Models.LibraryItem, action: GridCardAction) {
switch action {
@ -972,10 +982,6 @@ struct AnimatingCellHeight: AnimatableModifier {
.dynamicTypeSize(.small ... .accessibility1)
}
func menuItems(for item: Models.LibraryItem) -> some View {
libraryItemMenu(dataService: dataService, viewModel: viewModel, item: item)
}
var body: some View {
VStack(alignment: .leading) {
Color.systemBackground.frame(height: 1)
@ -1018,7 +1024,7 @@ struct AnimatingCellHeight: AnimatableModifier {
viewModel: viewModel
)
.contextMenu {
menuItems(for: item)
libraryItemMenu(dataService: dataService, viewModel: viewModel, item: item)
}
.onAppear {
if idx >= viewModel.fetcher.items.count - 5 {

View File

@ -13,7 +13,7 @@ enum LoadingBarStyle {
@MainActor final class HomeFeedViewModel: NSObject, ObservableObject {
let filterKey: String
@Published var fetcher: LibraryItemFetcher
@ObservedObject var fetcher: LibraryItemFetcher
let folderConfigs: [String: LibraryListConfig]
@Published var isLoading = false

View File

@ -13,6 +13,19 @@ import Views
action: { viewModel.itemUnderTitleEdit = item },
label: { Label("Edit Info", systemImage: "info.circle") }
)
Button(
action: { viewModel.setLinkArchived(dataService: dataService, objectID: item.objectID, archived: !item.isArchived) },
label: {
Label(
item.isArchived ? "Unarchive" : "Archive",
systemImage: item.isArchived ? "tray.and.arrow.down.fill" : "archivebox"
)
}
)
Button(
action: { viewModel.removeLibraryItem(dataService: dataService, objectID: item.objectID) },
label: { Label("Remove", systemImage: "trash") }
)
Button(
action: { viewModel.itemUnderLabelEdit = item },
label: { Label(item.labels?.count == 0 ? "Add Labels" : "Edit Labels", systemImage: "tag") }

View File

@ -432,7 +432,7 @@ struct WebReaderContainerView: View {
}, label: { Text(LocalText.readerSave) })
}
#if os(iOS)
.sheet(item: $safariWebLink) {
.fullScreenCover(item: $safariWebLink) {
SafariView(url: $0.url)
.ignoresSafeArea(.all, edges: .bottom)
}