-
Notifications
You must be signed in to change notification settings - Fork 31
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
Support multiple open items #829
base: master
Are you sure you want to change the base?
Conversation
cec3c1b
to
fcaffcf
Compare
33ad637
to
b384d53
Compare
1edc31b
to
01da13a
Compare
01da13a
to
ec5a5b2
Compare
e918514
to
21deedc
Compare
@michalrentka @dstillman
It currently supports PDF documents and notes, and should be straight-forward to add support for e.g. web snapshots and ePubs. UI-wise, it includes a bare minimum implementation using simple UIMenus, with these features:
Next (possible) steps (in separate PRs) are (a) an actual tab bar and (b) instead of using UIMenus create a custom view that allows e.g. closing any item and re-ordering. Feedback regarding icons and copy used will be much appreciated. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code-wise there are just some minor mostly style-related adjustments. After TO-DOs are resolved this looks good. I'll spend some more time testing this on device, but to me it looks good for at least internal user testing.
Some bugs and smaller issues I caught: |
0d7bd0d
to
0ea653e
Compare
It's the standard spacing for bar button items created with an image, it just seems like that because is next to another such button. We can use a custom view button instead, to decrease the image insets. Maybe we should consider using
Good catch, fixed in 33b5f63 |
22c148b
to
3a1f3b2
Compare
Looks good to me now, I didn't find new bugs yet. We should probably make an internal build for others to test or push it to beta. There are a ton of changes, so we should definitely test this thoroughly. @dstillman can decide. |
3a1f3b2
to
9a0d97b
Compare
@michalrentka rebased to master, to include the activity/scene title logic, and made some relevant improvements for the note editor. |
0320358
to
6f32108
Compare
6f32108
to
2925038
Compare
2925038
to
e61fa92
Compare
e61fa92
to
7d692d9
Compare
7d692d9
to
2f78180
Compare
2f78180
to
9f2852f
Compare
bd31e1f
to
9faffc0
Compare
9faffc0
to
8131f0b
Compare
429169c
to
bfbd058
Compare
keysByLibraryIdentifier[libraryId] = keys | ||
} | ||
do { | ||
let objects = try dbStorage.perform(request: ReadItemsWithKeysFromMultipleLibrariesDbRequest(keysByLibraryIdentifier: keysByLibraryIdentifier), on: .main) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this fails we'll end up with new keys
in keysByLibraryIdentifier
but token
in itemsTokenBySessionIdentifier
will be nil
. Shouldn't we update keysByLibraryIdentifier
only after successfully reading these objects?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
keysByLibraryIdentifier
is a local variable that is populated as a parameter for the db request, it's not used outside of the function scope.
Improve AppCoordinator code Keep track of open items count in items navigation bar Add ability to restore most recently opened item Implement state restoration for open items Allow switch to another open item via bar button menu Use instant presenter to switch between open items Maintain user order of open items Add support for notes in open items Validate open items when set on app launch Observe open items for deletions Add support for different open items per session Improve DetailCoordinator presented item replacement for multiple items Set user activity when new note is actually created Show actions submenu for current item Improve ItemsViewController right bar button items Add icons item type icons to open items menu Add close all action to open items menu Simplify NoteEditorViewController open items button creation Add PDFReaderViewController open items observer Add close other items action to submenu for current item Add getSessionIdentifier convenience property to UIViewController Save user activity when open items change w/o current item change Open items in their respective scene, if already open Update copy Improve NSUserActivity extension Simplify DetailCoordinator Improve open items bar button image creation Improve open items bar button creation Properly close PDF Reader when switching current open item Properly close Note Editor when switching current open item Improve note editor save callback for new notes Improve note editor activity title update Improve NoteEditorActionHandler Refactor PDFReaderState Improve PDFReaderActionHandler Pass note title when showing note editor Clarify NoteEditorState parameter names
a607962
to
db16b14
Compare
Adds support for multiple open items.
In consideration
Previously discussed in #782