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

New Media View - Loading indicators #2613

Closed
Tracked by #2606
mpivchev opened this issue Sep 27, 2023 · 4 comments · Fixed by #2660
Closed
Tracked by #2606

New Media View - Loading indicators #2613

mpivchev opened this issue Sep 27, 2023 · 4 comments · Fixed by #2660

Comments

@mpivchev
Copy link
Collaborator

mpivchev commented Sep 27, 2023

Related to: #2606

Old Media View had loading indicators for various actions, but the new one does not. The reason is the old indicators were part of a UIKit library, but we need to find a different solution for SwiftUI

There is a SwiftUI version of this lib, but after briefly trying it it didn't seem to work super well.

image
@mpivchev mpivchev self-assigned this Sep 27, 2023
@mpivchev mpivchev changed the title Loading indicators - Media View New Media View - Loading indicators Sep 27, 2023
@tobiasKaminsky tobiasKaminsky moved this to 🧭 Planning evaluation (don't pick) in 🤖 🍏 Clients team Sep 28, 2023
@tobiasKaminsky tobiasKaminsky moved this from 🧭 Planning evaluation (don't pick) to 📄 To do (max 2 entries / member) in 🤖 🍏 Clients team Sep 28, 2023
@marinofaggiana
Copy link
Member

it is necessary ?

@mpivchev
Copy link
Collaborator Author

mpivchev commented Oct 2, 2023

Yes, otherwise there is no feedback on what's happening.

@mpivchev mpivchev mentioned this issue Oct 2, 2023
6 tasks
@mpivchev mpivchev moved this from 📄 To do (max 2 entries / member) to 🏗️ In progress in 🤖 🍏 Clients team Oct 30, 2023
@mpivchev
Copy link
Collaborator Author

mpivchev commented Nov 2, 2023

@nextcloud/designers @marinofaggiana Regarding loading new metadata from the server, we need to have a loading indicator in a place that is always visible, like the toolbar. I think putting it here is a good solution:

image

@marinofaggiana
Copy link
Member

marinofaggiana commented Nov 2, 2023

Some consideration about new media (the indicator in the image is perfect for view the activity):

  • when you arrive in Media tab you can search new media image (searchNewMedia()) this is sufficient to detect any undetected images when starting the app.
  • to detect any new ones, simply return to the TOP to resend the query to the server, so pull to refresh is useless, pull to refresh is useful but in other contexts.
  • when in the bottom you use the func searchOldMedia()
  • the timer is indispensable so as not to send too many unnecessary queries to the server, especially when moving between images, this allows us to send the request only when it is wanted especially between intermediate dates , remember that images can be deleted or added via the web or other devices with dates before the current one, the system must detect them.
  • about delete or move, the best would be to make images marked to delete or move immediately removed (flag hide?) if everything works well you can also delete them otherwise an error will make them visible again; this would allow us not to use the ugly hud, via UIKit with the indexPath system this is not easy because crashes might happen but perhaps in swiftUI which has a completely different logic it becomes controllable.

in the searchOldMedia() and searchNewMedia() is used the :

let updateMetadatas = NCManageDatabase.shared.updateMetadatas(metadatas, metadatasResult: metadatasResult, addCompareLivePhoto: false) this allows us to know whether there has been any variation from the result updateMetadatas, this can allow us to manage even just in memory without re-executing the whole query from the DB.

Via the server, work is being done to make livephoto native, which will allow us to streamline the database work a lot in the future without having to put the results into an array but only handle the pointers.

@mpivchev mpivchev linked a pull request Nov 14, 2023 that will close this issue
@github-project-automation github-project-automation bot moved this from 🏗️ In progress to ☑️ Done in 🤖 🍏 Clients team Nov 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants