38 Commits

Author SHA1 Message Date
ashilkn
18d68bbdf3 Migrate to sqlite_async(13): Migrate db migration to use sqlite_async 2024-05-17 16:34:04 +05:30
ashilkn
16178b6f09 [mob][photos] Add missing paranthesis 2024-05-17 15:09:10 +05:30
ashilkn
c2b6032b6f [mob][photos] Fix broken query 2024-05-17 13:40:38 +05:30
ashilkn
28ddb93747 [mob][photos] Add missing parameters for query 2024-05-16 20:17:58 +05:30
ashilkn
dec7c45310 [mob][photos] Migrate to sqlite_async(9) 2024-05-16 16:41:57 +05:30
ashilkn
1a360d3ee7 [mob][photos] Migrate to sqlite_async(8): Migrate insert() + rearrange + clean up 2024-05-16 15:37:00 +05:30
ashilkn
cd023b621a [mob][photos] Remove optional parameter which should never be used
Since generatedID (_id) has NOT NULL constrain, it shouldn't be in a parameter set of a query
2024-05-16 12:59:19 +05:30
ashilkn
7fdc2b5e66 [mob][photos] Migrate to sqlite_async(8): Fix faulty update statements due to incorrect query generation 2024-05-16 12:48:21 +05:30
ashilkn
1e7779a819 [mob][photos] Remove method inline annotation which doesn
't have noticeable perf improvement + remove commented out code
2024-05-15 21:18:14 +05:30
ashilkn
56478fcb8a [mob][photos] avoid unnecessary compute 2024-05-15 21:10:37 +05:30
ashilkn
e179d351d9 [mob][photos] Migrate to sqlite_async(7): Assign String '{}' instead of map object {} to fix unexpected behaviour 2024-05-15 21:04:32 +05:30
ashilkn
25554209ec [mob][photos] Migrate to sqlite_async)(6): Migrate insertMultipleNew to use sqlite_async 2024-05-15 19:52:55 +05:30
ashilkn
d1a5921c27 [mob][photos] Migrate to sqlite_async(5): Create a method to get parameter set from file without calling getRowForFile() 2024-05-15 15:28:24 +05:30
ashilkn
ff14eb1d5a [mob][photos] Migrate to sqlite_async (4) 2024-05-14 14:59:03 +05:30
ashilkn
8fcd05b95f [mob][photos] Migrate to sqlite_async (3) 2024-05-13 18:29:01 +05:30
ashilkn
3a0882a1a9 [mob][photos] Migrate to sqlite_async (2): Migrate all update queries in filesDB 2024-05-13 17:57:22 +05:30
ashilkn
5bd845d32b [mob][photos] Migrate to sqlite_async (1) 2024-05-13 15:39:35 +05:30
vishnukvmd
6f338867e4 Add log 2024-04-30 16:04:50 +05:30
Neeraj Gupta
3e5648dae4
[mob][photos][internal] Enable fav + add to album action for shared files (#1484)
## Description


https://github.com/ente-io/ente/assets/254676/7ec2f82a-d0d1-4dbe-8836-87d1ffd793f6


## Tests

- [x] Hide Shared Item on Home Page If user has copied it.
- [x] Keep the fav state on the UI
- [x] Client side hash based dedupe works for copied items. Items are
linked to existing item instead of uploading duplicate entries
2024-04-20 15:33:54 +05:30
Ashil
8113b70441
[mob][photos] Remove code related to sqlite3 (#1490) 2024-04-19 18:11:52 +05:30
Ashil
c4c513a1d7
[mob][photos] Use sqlite_async instead of sqlite3 (#1489)
## Description

Using both `sqlite_async` and `sqlite3` for querying at the same time
was throwing this error:
`error: SqliteException(5): while executing, database is locked,
database is locked (code 5)`

So, have used `sqlite_async` everywhere.

## Tests

- [x] Tested all changes
2024-04-19 16:56:40 +05:30
Neeraj Gupta
01822b760d [mob][photos] Dedupe using hash before copying 2024-04-19 16:45:29 +05:30
Neeraj Gupta
02890a100b [mob][photos] Lint fix 2024-04-19 15:56:49 +05:30
Neeraj Gupta
564ca77a8b Merge remote-tracking branch 'origin/main' into mobile_save_a_copy 2024-04-19 14:57:19 +05:30
Neeraj Gupta
136f53b581 [mob][photos] Fix: Remove fav action on shared photos 2024-04-19 14:53:41 +05:30
Neeraj Gupta
3788fdda6f [mob][photos]Fix: Show fav icon on shared photos 2024-04-19 14:15:33 +05:30
ashilkn
23801f8fa6 Merge branch 'main' into migrate_from_sqflite 2024-04-18 17:15:08 +05:30
ashilkn
b238ba2c62 [mob] Migrate from sqflite (2) 2024-04-18 17:14:22 +05:30
ashilkn
eb68a6c293 [mob] Migrate from sqflite 2024-04-18 16:23:43 +05:30
ashilkn
e87ae499eb [mob] pref: use sqlite_async for getFilesCreatedWithinDurations 2024-04-18 10:59:22 +05:30
ashilkn
d07c4f4d1d Remove code used for debugging/testing 2024-04-10 12:29:01 +05:30
ashilkn
b9b623e3f7 fix: query in getAllLocalAndUploadedFiles doesn't work if limit is null 2024-04-10 11:11:39 +05:30
ashilkn
83d122341f Migrate getAllLocalAndUploadedFiles from sqflite to sqlite_async 2024-04-09 17:48:53 +05:30
ashilkn
785beeb9b3 Migrate getFilesInCollection from sqflite to sqlite_async 2024-04-09 17:40:22 +05:30
ashilkn
1ec941b022 Migrate getAllPendingOrUploadedFiles from sqflite to sqlite_async 2024-04-09 16:12:37 +05:30
Ashil
628d13ea53
[mobile][photos] Use sqlite async for fetching all files for search (#1391)
## Description

Using [sqlite_async](https://pub.dev/packages/sqlite_async) has
increased query speed by about 5x and has removed GC logs like:
`Background concurrent copying GC freed 424845(20MB) AllocSpace objects,
183(4932KB) LOS objects, 37% free, 39MB/63MB, paused 144us,44us total
128.048ms`, which has improved performance of the app.

Tried using [sqlite3](https://pub.dev/packages/sqlite3), which reduced
query speed by 10x and removed the GC log, but introduced some jank
since it blocks the UI.

Converting the fetched rows to `EnteFile` now runs on an isolate to
avoid blocking the UI.

## Tests

Did manual testing to see difference in jank.
2024-04-09 15:17:48 +05:30
Ashil
f8febe12df
[mobile][photos] Reupload files with missing GPS data (#1263)
## Description

- Fixes corrupt files (missing GPS data) that were uploaded due to [this
issue](https://github.com/ente-io/ente/pull/1261)
- Refactor

## Tests

Tested and working
- Uploaded two file from a build that has missing permission for
`ACCESS_MEDIA_LOCATION` and GPS data is missing.
- Created a new build with changes in this PR.
- Deleted the file from device. 
- Remote file has GPS data when checked from file info.

---------

Co-authored-by: Neeraj Gupta <254676+ua741@users.noreply.github.com>
2024-04-01 16:41:33 +05:30
Manav Rathi
41b2581b8f Move into mobile/ 2024-03-01 12:25:37 +05:30