103 Commits

Author SHA1 Message Date
shenlong
b037158028
fix(mobile): auto trash using MANAGE_MEDIA (#17828)
fix: auto trash using MANAGE_MEDIA

Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
2025-04-24 19:09:50 -05:00
Alex
c167e46ec7
chore: revert #16732 (#17819)
* chore: revert #16732

* lint
2025-04-23 16:40:59 -05:00
Toni
59fa8fbd0e
perf(mobile): remove small thumbnail and cache generated thumbnails (#17792)
* Remove small thumbnail and cache generated thumbnails

* Creating the small thumbnails takes quite some time, which should not be underestimated.
* The time needed to generate the small or big thumbnail is not too different from each other. Therefore there is no real benefit of the small thumbnail and it only adds frustration to the end user experience. That is because the image appeared to have loaded (the visual move from blur to something better) but it's still so bad that it is basically a blur. The better solution is therefore to stay at the blur until the actual thumbnail has loaded.
* Additionaly to the faster generation of the thumbnail, it now also gets cached similarly to the remote thumbnail which already gets cached. This further speeds up the all over usage of the app and prevents a repeatet thumbnail generation when opening the app.
* Decreased the quality from the default 95 to 80 to provide similar quality with much reduces thumbnail size.
* Use try catch around the read of the cache file.
* Use the key provided in the loadImage method instead of the asset of the constructor.

* Use userId instead of ownerId

* Remove import

* Add checksum to thumbnail cache key
2025-04-23 10:31:35 -05:00
Alex
13d6bd67b1
feat: no small local thumbnail (#17787)
* feat: no small local thumbnail

* pr feedback
2025-04-23 14:02:51 +00:00
Toni
1de2eae12d
perf(mobile): remove load of thumbnails in the image provider (#17773)
Remove loading of thumbnail in the image provider

* Removed the load of the thumbnail from the local and remote image provider as they shall provide the image, not the thumbnail. The thumbnail gets provided by the thumbnail provider.
* The thumbnail provider is used as the loadingBuilder and the image provider as the imageProvider. Therefore loading the thumbnail in the image provider loads it a second time which is completely redundant, uses precious time and yields no results.

Co-authored-by: Alex <alex.tran1502@gmail.com>
2025-04-23 13:55:51 +00:00
Matthew Momjian
699fdd0d1b
fix(mobile): recently added -> taken (#17780) 2025-04-23 12:38:25 +01:00
Łukasz Wawrzyk
ee017803bf
fix(mobile): use immutable cache keys for local images (#17794) 2025-04-23 02:32:03 +00:00
Alex
0986a71ce3
fix(mobile): revert cache fixes (#17786)
* Revert "fix(mobile): use immutable cache keys for local images (#17736)"

This reverts commit 010b144754680f39979a65668311b5a5ffee2416.

* Revert "perf(mobile): remove small thumbnail and cache generated thumbnails (#17682)"

This reverts commit b71039e83c2497f9829f1592573dbc2e85bb2f2c.
2025-04-22 12:15:54 -05:00
Łukasz Wawrzyk
010b144754
fix(mobile): use immutable cache keys for local images (#17736)
fix(mobile): usse immutable cache keys for local images
2025-04-21 13:00:46 -05:00
Toni
b71039e83c
perf(mobile): remove small thumbnail and cache generated thumbnails (#17682)
* Remove small thumbnail and cache generated thumbnails

* Creating the small thumbnails takes quite some time, which should not be underestimated.
* The time needed to generate the small or big thumbnail is not too different from each other. Therefore there is no real benefit of the small thumbnail and it only adds frustration to the end user experience. That is because the image appeared to have loaded (the visual move from blur to something better) but it's still so bad that it is basically a blur. The better solution is therefore to stay at the blur until the actual thumbnail has loaded.
* Additionaly to the faster generation of the thumbnail, it now also gets cached similarly to the remote thumbnail which already gets cached. This further speeds up the all over usage of the app and prevents a repeatet thumbnail generation when opening the app.

* Decrease quality and use try catch

* Decreased the quality from the default 95 to 80 to provide similar quality with much reduces thumbnail size.
* Use try catch around the read of the cache file.

* Replace ImmutableBuffer.fromUint8List with ImmutableBuffer.fromFilePath

* Removed unnecessary comment

* Replace debugPrint with log.severe for catch of error

---------

Co-authored-by: Alex <alex.tran1502@gmail.com>
2025-04-21 12:51:37 -05:00
shenlong
81ed54aa61
feat: user sync stream (#16862)
* refactor: user entity

* chore: rebase fixes

* refactor: remove int user Id

* refactor: migrate store userId from int to string

* refactor: rename uid to id

* feat: drift

* pr feedback

* refactor: move common overrides to mixin

* refactor: remove int user Id

* refactor: migrate store userId from int to string

* refactor: rename uid to id

* feat: user & partner sync stream

* pr changes

* refactor: sync service and add tests

* chore: remove generated change

* chore: move sync model

* rebase: convert string ids to byte uuids

* rebase

* add processing logs

* batch db calls

* rewrite isolate manager

* rewrite with worker_manager

* misc fixes

* add sync order test

---------

Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
Co-authored-by: Alex <alex.tran1502@gmail.com>
2025-04-17 10:25:27 -05:00
Alex
b2c903c000
feat(mobile): use Weblate for i18n (2) (#17620)
* feat(mobile): use Weblate for i18n (2)

* remove old translation files

* dedup keys

* remove migration report

* chore

* remove localizely.yml
2025-04-15 15:54:26 +00:00
Aleksandr
2b131fe935
feat: opt-in sync of deletes and restores from web to Android (#16732)
* Features: Local file movement to trash and restoration back to the album added. (Android)

* Comments fixes

* settings button marked as [EXPERIMENTAL]

* _moveToTrashMatchedAssets refactored, moveToTrash renamed.

* fix: bad merge

* Permission check and request for local storage added.

* Permission request added on settings switcher

* Settings button logic changed

* Method channel file_trash moved to BackgroundServicePlugin

---------

Co-authored-by: Alex <alex.tran1502@gmail.com>
2025-04-08 08:50:40 -05:00
shenlong
b58a450152
fix(mobile): prevent unnecessary reload on multi user timeline (#17418)
Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
2025-04-06 22:04:13 -05:00
shenlong
97e52c5156
refactor(mobile): device asset entity to use modified time (#17064)
* refactor: device asset entity to use modified time

* chore: cleanup

* refactor: remove album media dependency from hashservice

* refactor: return updated copy of asset

* add hash service tests

* chore: rename hash batch constants

* chore: log the number of assets processed during migration

* chore: more logs

* refactor: use lookup and more tests

* use sort approach

* refactor hash service to use for loop instead

* refactor: rename to getByIds

---------

Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
2025-04-03 14:42:35 -05:00
Alex
8bc80076bb
fix(mobile): show new local assets in offline mode (#16817)
fix: show new local assets in offline mode
2025-03-24 16:56:18 +00:00
shenlong
ad151130f9
chore: rename user api interface (#17062)
Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
2025-03-24 11:00:08 -05:00
shenlong
9cf3b88f80
refactor(mobile): remove int user id (#16814)
* refactor: user entity

* chore: rebase fixes

* refactor: remove int user Id

* refactor: migrate store userId from int to string

* refactor: rename uid to id

* fix: migration

* pr feedback

---------

Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
2025-03-18 11:05:37 -05:00
shenlong
dd263b010c
refactor(mobile): use user service methods (#16783)
* refactor: user entity

* chore: rebase fixes

* refactor(mobile): refactor to use user service methods

* fix: late init error

* fix: lint

---------

Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
Co-authored-by: Alex <alex.tran1502@gmail.com>
2025-03-18 08:32:33 -05:00
shenlong
b778a86c99
refactor(mobile): move user service to domain (#16782)
* refactor: user entity

* chore: rebase fixes

* refactor(mobile): move user service to domain

* fix: timeline not visible on album selection page

---------

Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
2025-03-13 22:20:26 -05:00
shenlong
d1c8fe5303
refactor: user entity (#16655)
* refactor: user entity

* fix: add users to album & user profile url

* chore: rebase fixes

* generate files

* fix(mobile): timeline not reset on login

* fix: test stub

* refactor: rename user model (#16813)

* refactor: rename user model

* simplify import

---------

Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
Co-authored-by: Alex <alex.tran1502@gmail.com>

* chore: generate files

* fix: use getAllAccessible instead of getAll

---------

Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
Co-authored-by: Alex <alex.tran1502@gmail.com>
2025-03-12 08:56:56 -05:00
shenlong
ac1b2d2fab
chore(mobile): generated files and ci check (#16798)
* chore(mobile): more generated files

* ci: verify generated files in mobile are up-to-date

---------

Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
2025-03-11 12:22:31 +00:00
Alex
75fa305e98
chore: flutter 3.29.1 (#16730)
* update dependencies

* update flutter version reference

* update flutter version reference

* update AndroidManifest with flutter_web_auth_2

* chore: lock file flutter version

* fix: ios build
2025-03-10 21:46:36 -05:00
Alex
82624b0979
chore(mobile): upgrade riverpod (#16742) 2025-03-09 20:30:58 -05:00
shenlong
fe931faf17
refactor: exif entity (#16621)
Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
2025-03-06 11:58:24 -06:00
Arno
4ebc25c754
feat(mobile): Folder View for mobile (#15047)
* very rough prototype for folder navigation without assets

* fix: refactored data model and tried to implement asset loading

* fix: openapi generator shadowing query param in /view/folder

* add simple alphanumeric sorting for folders

* basic asset viewing in folders

* rudimentary switch sorting order

* fixed reactivity when toggling sort order

* Fixed trailing comma

* Fixed bad merge conflict resolution

* Regenerated open-api

* Added rudimentary breadcrumbs

* Fixed linting problems

* feat: cleanup

---------

Co-authored-by: Alex <alex.tran1502@gmail.com>
Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
2025-03-06 17:27:43 +00:00
Alex
1ed1a0a1fc
feat(mobile): new sync (#16556)
* feat(mobile): new sync

* refactor

* refactor

* refactor

* refactor

* refactor

* refactor

* update analysis option

* remove database operation

* pr feedback
2025-03-06 08:44:28 -06:00
shenlong
3f4bbab4eb
fix: isar crash on resume from app detach (#16599)
Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
Co-authored-by: Alex <alex.tran1502@gmail.com>
2025-03-05 08:28:40 -06:00
shenlong
4db8f0c666
refactor(mobile): move timeline methods to timeline repo (#16526)
* refactor: move timeline calls to timeline repo

* refactor: review changes

---------

Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
2025-03-03 09:10:09 -06:00
luzpaz
c8eef5ad4d
fix(mobile): fix typos (#16456)
Found via codespell
2025-03-01 20:06:47 +00:00
shenlong
28c664c769
refactor(mobile): log service (#16383)
refactor: log service

Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
2025-02-27 15:18:49 -05:00
Alex
c70c9067b0
refactor(mobile): backup provider (#16360)
* refactor(mobile): backup provider

* refactor(mobile): backup provider
2025-02-27 09:56:23 -06:00
Alex
8fbd650483
refactor(mobile): refactor user provider (#16358) 2025-02-26 17:04:43 -06:00
Alex
d0381fddec
refactor(mobile): render list (#16303)
* refactor(mobile): render list 2

* wip

* wip: asset selection page

* remove render_list provider

* remove dead code

* yaml format

* remove unused file

* woop woop more clean up

* woop woop more clean up 2

* fix: album selection doesn't load instantly
2025-02-25 11:33:48 -06:00
Alex
579321251f
refactor(mobile): partners provider (#16299)
* refactor(mobile): partners provider

* update analysis option

* update analysis option
2025-02-25 08:52:33 -06:00
Alex
5acf6868b7
refactor(mobile): render list (#16239)
* refactor(mobile): trash provider

* refactor(mobile): trash provider

* pr feedback

* archive timeline

* favorite

* album

* trash timeline

* all videos timeline

* refactor

* refactor: home timeline and partner timeline

* update analysis option
2025-02-21 09:01:46 -06:00
Alex
17a2043e76
refactor(mobile): trash provider (#16219)
* refactor(mobile): trash provider

* refactor(mobile): trash provider

* pr feedback
2025-02-20 22:14:41 -06:00
shenlong
76d95cd348
refactor(mobile): move store settings and store into domain folder (#16201)
Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
2025-02-19 19:27:32 +00:00
shenlong
aeb3e0a84f
refactor(mobile): split store into repo and service (#16199)
* refactor(mobile): migrate store

* refactor(mobile): expand abbreviations

* chore(mobile): fix lint

---------

Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
Co-authored-by: Alex <alex.tran1502@gmail.com>
2025-02-19 13:05:24 -06:00
Alex
9d4aee36e2
refactor(mobile): asset provider (#16159)
* refactor(mobile): asset provider

* wip

* wip: delete local assets

* wip: delete remote assets

* wip: deletion logic

* refactor

* pr feedback
2025-02-18 13:10:55 -06:00
Alex
4f912de018
refactor(mobile): album provider (#16099) 2025-02-14 19:27:39 -06:00
Alex
47203d2760
refactor(mobile): asset stack provider (#16100)
* refactor(mobile): asset stack provider

* remove file from ignore list
2025-02-14 13:23:14 -06:00
Alex
098bab7c9b
fix(mobile): search page issues (#15804)
* fix: don't repeat search

* fix: show snackbar for no result

* fix: do not search on empty filter

* chore: syling
2025-01-31 03:12:57 +00:00
Tom Graham
efbc0cb192
fix(mobile): 14983 Images upload to shared album with common name (#15127)
* Initial look at fixing issue where images are uploaded to the wrong album if a shared album conflicts with a local users album.

* Use owner instead of shared flag when fetching albums.

* Fix issue with refreshRemoteAlbums getting shared items twice and removed incorrect isShared comment.

Using `getAll(shared: true)` gets all shared albums the user can access (regardless of owner, despite the previous comment).

Using `getAll(shared: null)` gets all albums (incuding shared = true and shared = false). I presume the intent here was to get albums that were shared (and not mine), and not shared (ie: mine), but the logic is way off. It also just then combines them - so makes more sense to just get them in a single call.

* Fix formatting.

* Fixed tests.

* Revert "Fixed tests."

This reverts commit c38f5af5acfc38444b00ed716755c241d297216a.

* Revert "Fix issue with refreshRemoteAlbums getting shared items twice and removed incorrect isShared comment."

This reverts commit 979ce90abf22c6cd80ff06f61a08d0c03092991b.

* Added comments to explain why filters behave the way they do for getAll() albums.

---------

Co-authored-by: Tom graham <tomg@questps.com.au>
Co-authored-by: Alex <alex.tran1502@gmail.com>
2025-01-16 21:24:09 -06:00
Alex
fd99bd05cf
feat(mobile): share to mechanism (#15229)
* setup ios

* chore: succesfully sent media to the app

* share from Android

* wip: navigate to share screen

* wip: UI for displaying upload candidate

* wip: logic

* wip: upload logic

* wip: up up up we got it up

* wip

* wip

* wip

* upload state

* feat: i18n

* fix: release build ios'

* feat: clear file cache

* pr feedback

* using const for checking download status

---------

Co-authored-by: Alex <alex@pop-os.localdomain>
2025-01-16 21:20:44 -06:00
Alex
9503bf479b
feat(album): album view sort order (#14648)
* feat(mobile): album view sort order

* feat: add error message

* refactor(mobile): album page (#14659)

* refactor album page

* update lint rule

* const record

* fix: updating sort order when pull to refresh

---------

Co-authored-by: Alex <alex.tran1502@gmail.com>

* Move sort toggle button to bottom sheet menu

* chore: revert multiselectgrid loading status

* chore: revert multiselectgrid loading status

---------

Co-authored-by: Mert <101130780+mertalev@users.noreply.github.com>
2024-12-16 16:11:48 +00:00
dvbthien
11f585d0ad
refactor(mobile): refactor theme management (#14415) 2024-12-11 16:30:56 +00:00
Alex
055f1fc72f
feat(mobile): Auto switching server URLs (#14437) 2024-12-05 09:11:48 -06:00
shenlong
3c38851d50
feat(mobile): native_video_player (#12104)
* add native player library

* splitup the player

* stateful widget

* refactor: native_video_player

* fix: handle buffering

* turn on volume when video plays

* fix: aspect ratio

* fix: handle remote asset orientation

* refinements and fixes

fix orientation for remote assets

wip separate widget

separate video loader widget

fixed memory leak

optimized seeking, cleanup

debug context pop

use global key

back to one widget

fixed rebuild

wait for swipe animation to finish

smooth hero animation for remote videos

faster scroll animation

* clean up logging

* refactor aspect ratio calculation

* removed unnecessary import

* transitive dependencies

* fixed referencing uninitialized orientation

* use correct ref to build android

* higher res placeholder for local videos

* slightly lower delay

* await things

* fix controls when swiping between image and video

* linting

* extra smooth seeking, add comments

* chore: generate router page

* use current asset provider and loadAsset

* fix stack handling

* improved motion photo handling

* use visibility for motion videos

* error handling for async calls

* fix duplicate key error

* maybe fix duplicate key error

* increase delay for hero animation

* faster initialization for remote videos

* ensure dimensions for memory cards

* make aspect ratio logic reusable, optimizations

* refactor: move exif search from aspect ratio to orientation

* local orientation on ios is unreliable; prefer remote

* fix no audio in silent mode on ios

* increase bottom bar opacity to account for hdr

* remove unused import

* fix live photo play button not updating

* fix map marker -> galleryviewer

* remove video_player

* fix hdr playback on android

* fix looping

* remove unused dependencies

* update to latest player commit

* fix player controls hiding when video is not playing

* fix restart video

* stop showing motion video after ending when looping is disabled

* delay video initialization to avoid placeholder flicker

* faster animation

* shorter delay

* small delay for image -> video on android

* fix: lint

* hide stacked children when controls are hidden, avoid bottom bar dropping

---------

Co-authored-by: Alex <alex.tran1502@gmail.com>
Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
Co-authored-by: mertalev <101130780+mertalev@users.noreply.github.com>
2024-12-04 16:03:46 -05:00
Alessandro Piccin
411878c0aa
fix(mobile): album most recent sorting on mobile (#13766)
* Fix album most recent sorting on mobile

* fix: format

* fix: format

---------

Co-authored-by: Alex <alex.tran1502@gmail.com>
2024-12-04 19:53:55 +00:00