-
Notifications
You must be signed in to change notification settings - Fork 137
[fix/viewer] Viewer fixes, refactoring and minor improvements #951
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
Conversation
|
…bsystem in one place - DisplayViewController: - use of OCClaim to let the SDK update the item - additional logging around VersionUpdates - consistent tracking of version information and avoidance of re-rendering the same file multiple times - further cleanup - update MDM documentation and doc/CONFIGURATION.json
- factor out generation of displayBarButtonItems - move generation of dots button into actionBarButtonItem method/property - add subclassing point for generation of the standard dots button - PDFViewerViewController: - replace setupToolbar() with PDF-specific implementation based on the previous setupToolbar - add (previously missing?) dots button
- add setup() method as entry point for initializations - add method and property to give viewers control over content refreshes, defaulting to "always update" - DisplayExtension: call setup() method during instance creation - PDFViewController: use new setup() method to change default update strategy for PDF files to "ask"
- DisplayViewController: - unify claim addition / removal in item.didSet - add missing automatic claim removal - further cleanup
@felix-schwarz unfortunately I ran into the same problem: |
@felix-schwarz what is strange: After running in the problem that the file could not be opened, I did the following:
I expected that deleting all local copies will download the file again and could be opened. |
@felix-schwarz I also discovered a crash: |
@hosy Thanks for the log. I'll go through it right away. Regarding the crash, I found no smoking gun in the code at this place (especially the highlighted |
|
- handle case of non-existant local copy of file in DisplayViewController
@hosy Thanks again for the log. It helped track this issue down, which turned out to be a really very specific edge case. I wrote down what happened in a new comment: https://github.com/owncloud/ios-sdk/blob/7abe23141d7a183add451e8770fc38592996f0c5/ownCloudSDK/Core/ItemList/OCCore%2BItemList.m#L570 The issue should finally be fixed now. |
@felix-schwarz thanks a lot! Yes, it fixes the issue. Just found a very rare problem:
Mostly the item will be reloaded on the device, but sometimes the preview controller will stuck in "Loading…" state. |
@hosy Could reproduce the CSV issue after many tries and found a deadlock that could cause a hang of the main thread + OCCore thread. Fixed the deadlock now. Hope it was the issue you ran into, too. |
QANew PDF updating feature
Other updates in different kind of files
#942 -> not able to reproduce. I tried different ways to check that the file is not opened in preview or markup mode (using a completely new account, browsing through photos, opening different kind of files repeatedly...). Those checks were done with the current develop branch, in commit |
(1)Probably is the same issue described above with CSV, but i have reproduced it with a txt file. I did the following steps:
Finally, the app runs into a I caught some logs: ownCloud_26_Apr_2021_at_14_26_00.log.txt app: |
…iewController for every reload to address (1) in #951
@jesmrec I have been able to reproduce this on the device, but not in the Simulator and implemented a partial fix that creates a new Partial fix because the issue can still occur, but seems to be internal to Apparently others have run into this issue before: https://stackoverflow.com/questions/13649555/invalidating-qlpreviewcontroller-cache I also tried to create a clone of the file with every change and then point I therefore believe that we can't currently work around this issue in |
ok, then the problem under the hood is not totally fixable. We should not forget this, just in case. As i commented, i only reproduce with txt files. #942 is not reproducible on my side as i posted in QA post, we can move this forward and wait for feedback/logs in case someone else can reproduce it. Is this ok for you @hosy ? |
@jesmrec yes, this works for me. I will also keep this issue in mind and we can move forward. Thanks! |
Description
DisplayViewController
andDisplayHostViewController
for structural clarity, reinforcement and separation of functionality and concernsRelated Issue
#935 #942
Screenshots (if appropriate):
Types of changes
QA
checks: #951 (comment)
reports: