1693 Commits

Author SHA1 Message Date
ashilkn
b139dea7ff [mob][photos] Make code cleaner 2024-12-18 15:51:50 +05:30
Neeraj Gupta
1115bf7b56 Merge remote-tracking branch 'origin/main' into mobile-preview-video 2024-12-18 15:42:07 +05:30
ashilkn
80857d5441 [mob][photos] Use better icon for switching to media_kit on video player 2024-12-18 15:40:09 +05:30
ashilkn
0d920a35e7 [mob][photos] Remove unused code 2024-12-17 21:37:00 +05:30
ashilkn
38860d91d3 [mob][photos] Make '?' icon for switching to media_kit player more noticeable 2024-12-17 21:09:39 +05:30
ashilkn
6851d0fae5 [mob][photos] Extract strings 2024-12-17 21:05:46 +05:30
ashilkn
8e2f052ac3 Merge branch 'main' into use_media_kit_for_unsupported_videos 2024-12-17 20:55:55 +05:30
ashilkn
9a89153563 [mob][photos] Fix UX/UX issue when a video is opened that has a caption/description 2024-12-17 19:02:25 +05:30
ashilkn
f681c956ea [mob][photos] UX improvement on switching to media kit player from native video player 2024-12-17 18:02:37 +05:30
ashilkn
4422b4a7b0 [mob][photos] Automatically change to media kit if video not playable on ios + let the user manually switch to media kit 2024-12-17 17:58:05 +05:30
Prateek Sunal
5dba461481 fix: use object id for cache video and playlist keys 2024-12-15 00:36:34 +05:30
Neeraj Gupta
fd04cd0a98
Fix #4296 + download UI improvement + fixes (#4369)
## Description

### Background 
Proposal to fix #4296 (@ua741). High level, there is a race condition
which is generating wrong entries in the FilesDB (creating orphan
files). This issue is easily replicable if you select multiple files and
try to download them (the more files, the more likely wrong entries will
be created). This issue is also messing up with the date of the files we
see in the timeline and is creating "orphan" (not linked to uploaded
files) files in the device collections.

To my understanding, this is quite a critical bug and any user is very
likely to encounter it in the current implementation.

There is some self healing already in place that will reupload all those
files and this should correct the dates, but this will only do it 10
files at a time, and based on potential candidates, without fixing the
orphan entries. I was also able to produce files which were never
corrected.

### This pull request
After extensive tests and lots of debugging, I was able to fully fix
this issue (meaning I am not able to reproduce it, at all, and I tried a
lot..). I also do not see any orphan in the device collection
("Pictures" folder for Android), while i could see 20+ (even more) each
time I was trying to replicate the issue. To fix it, I have:

- created a new class `PhotoManagerSafe` which is safely making sure
that the app will not react to file changes when it has been asked not
to do so (previous implementation allowed scenarios where a caller was
executing code thinking no change notification would be sent).
- created a Lock in the `LocalSyncService` that is used to make sure no
local synchronisation can be performed at the same time a download is
performed (this was the main culprit). The main side effect is that when
you download multiple files, they will be processed sequentially. I
think this can be improved but the main "side" advantage is that
whenever there is a failure, not a lot will be lost and it is more
robust in that way if you want to download a big collection. It would be
better to have at least 2 threads downloading/decrypting at the same
time, maybe (maybe not needed as well)?
- improved the "Downloading files..." dialog, which is now showing the
progress (for example "Downloading files... (235/494)"), so that the
user knows if something is actually happening and what is the current
progress.
- Added a missing call on the Video Editor page where the change notify
was stopped but never started again at the end when task was performed.

Feel free to close this PR if not suitable according to you, I can also
take feedback and try to implement them as best as I can.

## Tests

Tested on my Pixel 6a

Built with :

Flutter 3.24.3
JDK 17.0.2
Gradle 7.2
2024-12-13 14:17:34 +05:30
Simon Dubrulle
32ed84f48d Moved getFile() outside lock + Implemented simple Download queue 2024-12-13 08:34:52 +01:00
ashilkn
e81986a27c [mob][photos] Fix NaN exception 2024-12-11 20:13:23 +05:30
ashilkn
27c66ce2f7 [mob][photos] Chore 2024-12-11 19:57:46 +05:30
ashilkn
401ed5bf9c [mob][photos] Improve media_kit player's video control UX (3) 2024-12-11 17:35:18 +05:30
ashilkn
e5743fceed [mob][photos] Improve media_kit player's video control UX (2) 2024-12-11 17:21:51 +05:30
Simon Dubrulle
e9a8449a64 Implemented first PR feedbacks: removed PhotoManagerSafe not needded with LocalSyncService lock 2024-12-11 10:14:52 +01:00
ashilkn
22e4f6bc94 [mob][photos] Improve media_kit player's video control UX 2024-12-11 11:45:16 +05:30
ashilkn
ca95ea8de2 [mob][photos] Make seekbar work for new media_kit controls 2024-12-11 10:58:15 +05:30
vishnukvmd
7aedfb7e9b Copy changes 2024-12-10 08:58:27 -08:00
ashilkn
61e1ea4f42 [mob][photos] Create new seekbar, duration and time elapsed for new media_kit controls 2024-12-10 20:45:58 +05:30
Simon Dubrulle
9658cde381 Fixed incoherent message format in download dialog 2024-12-10 14:34:56 +01:00
ashilkn
dec2ee7202 [mob][photos] Start creating new controls (play pause button is done), similar to controls of native player. 2024-12-10 18:01:55 +05:30
Simon Dubrulle
0cb79102fd Creation of PhotoManagerSafe + lock in LocalSyncService + improved download UI + missing notify call 2024-12-10 13:25:00 +01:00
ashilkn
2e2e381100 [mob][photos] Create a new widget that uses native_video_player for video playback by default and toggles to use media_kit for playback when UseMediaKitForVideo event is fired 2024-12-10 16:09:59 +05:30
ashilkn
5893c927c2 [mob][photos] Rename old video player 2024-12-10 15:48:36 +05:30
Neeraj Gupta
77856f2b6d [mob] Copy update 2024-12-10 00:33:43 +05:30
Neeraj Gupta
0e677f052b [mob] Move trusted contact code from old repo 2024-12-06 21:02:24 +05:30
ashilkn
dcc5cb9bee [mob][photos] Fix safe area issue in image editor 2024-12-05 19:53:27 +05:30
ashilkn
b6df7bf969 [mob][photos] Fix selection actions sheet being under android system nav bar 2024-12-05 19:45:38 +05:30
ashilkn
1cdaf7e023 [mob][photos] Minor UI improvements to TextInputWidget 2024-12-05 16:14:10 +05:30
ashilkn
98c604a73e [mob][photos] Fix clipping of TextInputWidget toward the right end when there is no suffix icon 2024-12-05 16:08:42 +05:30
Neeraj Gupta
f19f1b0c68 [mob] Log video compression progress 2024-12-05 15:40:20 +05:30
ashilkn
ceeac4222e [mob][photos] Remove 'Descriptions' section from search tab 2024-12-05 15:12:03 +05:30
Alexis L
918d03aae9 [mob][photos] Fix state issue when reloading avatar (#4311)
- Fixed by adding a key to the PersonGridItem, that way it gets refreshed when the person is changed
2024-12-04 18:50:13 +01:00
Neeraj Gupta
bc72872f26
[mob][photos] Fix dialog that is supposed to be shown when turning off downloads coming up only when turning on downloads in manage link screen (#4284) 2024-12-04 11:13:17 +05:30
ashilkn
a905a1fa44 [mob][photos] Fix UX issue with video controls when viewing a video memory 2024-12-03 21:33:18 +05:30
Prateek Sunal
ffeb9da0d6 fix(preview): cache previewed list, use native player by default 2024-12-03 00:11:18 +05:30
ashilkn
6544f0b839 [mob][photos] Fix dialog that is supposed to be shown when turning off downloads coming up only when turning on downloads in manage link screen 2024-12-02 20:03:19 +05:30
Neeraj Gupta
03de70d5f8
[mob] Move manage device cache option from Advance to Free up space (#4265)
## Description

## Tests
2024-11-30 14:56:08 +05:30
Neeraj Gupta
5b873b794d [mob] Rename copy 2024-11-30 14:53:03 +05:30
Neeraj Gupta
de6caf9958 [mob] Move manage device storage under free up section 2024-11-30 14:48:52 +05:30
Neeraj Gupta
bbbb49f401 [mob] Dismiss keyboard on tapping outside 2024-11-29 21:41:59 +05:30
Prateek Sunal
7193a61a11 Merge remote-tracking branch 'origin/main' into mobile-preview-video 2024-11-28 22:25:20 +05:30
Prateek Sunal
13da082cda fix: check files db if preview exist 2024-11-28 21:32:26 +05:30
Ashil
d26c7fcf8a
[mob][photos] Fix video not changing in viewer after deletion (#4237) 2024-11-28 19:22:03 +05:30
ashilkn
481377baeb [mob][photos] Chore 2024-11-28 17:32:54 +05:30
ashilkn
094d879702 [mob][photos] Fix video not changing in viewer after deletion 2024-11-28 17:32:20 +05:30
ashilkn
61791d5b9b [mob][photos] Fix alginment of hintText in search bar for smaller font sizes 2024-11-28 15:15:04 +05:30