Closed tomastiminskas closed 1 year ago
this looks good. The only thing I'd add is that maybe it makes sense to also manage ongoing downloads and have the ability to cancel/remove from queue. What do you think @tomastiminskas @Antanasijevic ?
@jimBeaux27 makes sense. Also ability to disable auto download of media content on messages render event
leaving this here since it's related & we will prob consolidate: https://github.com/stakwork/sphinx-ios/issues/112
As of today @Antanasijevic came to the conclusion that really the big items that will take up space are:
There are a few ways to break down the media sections:
@tomastiminskas @pitoi
@Antanasijevic and I met and we walk away with the following conclusions:
Ideal Long Term Goal: On the profile page, the user has a way to manage storage. There will be a bar indicating storage usage with the button labeled "manage".
When that Manage Page opens:
Phases We think there are a few phases/levels to this:
@jimBeaux27 it sounds good to me. The only thing that I would add is the ability to enable/disable auto download on chats. Right now when you receive a media message (image, video, audio), it will download automatically when rendered in the chat view. Disabling that will just show the image/video placeholder and a button will allow user to download it and access it.
I think this can be done in the initial phase of the feature development.
Some follow up questions @tomastiminskas :
@jimBeaux27
Re #2: How do you determine age for each media type:
For messages it's more obvious. In the case of podcasts less so. Do you delete based on publish date? Based on date last consumed?
For me anecdotally I'd be mad if there's a really old podcast I'm digging back into and I can't see it b/c garbage cleanup is fighting me :)
I would apply the age criteria for messages media content first, since those are downloaded automatically to the device right now. I wouldn't apply that for podcast/video in the first phase since those items are downloaded manually and intentionally by the user and deleting them sounds invasive. Something to think about, but maybe if video/podcasts are taking more than 75% of the max storage set, we could throw an alert to the user inviting him to manage those manually from Profile
@jimBeaux27 @tomastiminskas Guys, here is a mock-up and a video preview of features we discussed. This sample should be used as a starting point so we can discuss details. Please let me know what you think.
https://github.com/stakwork/sphinx-ios/assets/13258550/9d355e48-01e4-4d41-870d-e4e73039d82c
Thanks @Antanasijevic this looks really good and it's cool to see your vision come to life.
@tomastiminskas one issue I think we may have is that based on what I see, all of the images stored in the SDImageCache are effectively in the same "bucket". We don't actually seem to have a way to relate the images themselves to a given chat as it stands (correct me if I'm wrong but the cache is just one big array basically). We would either have to:
Let me know your thoughts. You can check what I've done so far specifically the StorageManager and its getImageCacheItems/getImageCacheSize methods. I set it up so that it runs in the background when all tribes loads as a way to experiment.
Other point worthy of note: The cache from the images for me only takes up about 120MB and I use it almost every day since about December. There are methods that actually allow you to set the max cache size if that becomes a problem.
In comparison, I have about 4 GB worth of podcasts downloaded which clearly takes up the lion's share of space. I think that may also be a factor in the way we think about this. Downloaded media is going to take up way more space than the passively downloaded chat media as far as I can tell.
@jimBeaux27 definitely let's change the way Cache is stored so we can have a way to relate each item to the specific chat it belongs. We can take care later of a migration process for backward compatibility.
Ok I think I have most of the fundamental issues resolved and the core business logic written. Now it's a matter of implementing the UI. I think there shouldn't be too many major issues implementing the design as is.
@Antanasijevic Do we consider this UI approved or are we still tweaking it?
@Antanasijevic couple details I noticed:
@tomastiminskas @jimBeaux27 @pitoi Here is a video recording of updated managing storage flow. It contains all features we discussed. Please, check it out so we can go over it once again before i post final version.
Few notes:
Once amount of storage becomes smaller than size of media, we should show a notification, clearly explaining how much of media will be deleted (i have provided an example of this in the video). If user decides to do so, we may add a pop up notification asking user if he is sure about this action.
Similar to previous case, for each bulk delete action, we may add a pop up notification, asking user if he is sure he want to delete all selected media, to prevent accidental deletion.
https://github.com/stakwork/sphinx-ios/assets/13258550/bbe0bbfc-883c-4e18-a8d2-abd8aa913079
@pitoi @tomastiminskas @jimBeaux27 In addition to main screens, i have created delete notifications. I suggest we make a difference between bulk delete (delete all images/podcasts..) and delete selected images/videos. Please, check out this video and let me know what you think.
Few notes:
https://github.com/stakwork/sphinx-ios/assets/13258550/d13b0d68-3387-4e8d-831a-ab1a22f4fc28
We need a way to allow user to inspect and manage media storage on the app.
Add a max storage limit field on Profile in GB: start deleting old items from local storage as new onces are created when the limit is reached. 2.
Build UI interface to manage storage: Here are some screenshots from WhatsApp on how it handles it and some ideas on what we could implement to improve this on Sphinx.
Total space used by Sphinx:
List of chats with media on each chat:
Details of media on each chat with ability to delete items: