From 658ba49186478eb4bb96432693075c85b89e1f56 Mon Sep 17 00:00:00 2001 From: Neeraj Gupta <254676+ua741@users.noreply.github.com> Date: Mon, 4 Aug 2025 12:42:27 +0530 Subject: [PATCH 01/10] [mob][photos] Log info about lock --- mobile/apps/photos/lib/db/upload_locks_db.dart | 17 +++++++++++++++++ mobile/apps/photos/lib/utils/file_uploader.dart | 3 ++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/mobile/apps/photos/lib/db/upload_locks_db.dart b/mobile/apps/photos/lib/db/upload_locks_db.dart index ab786d5c78..dc2bfab079 100644 --- a/mobile/apps/photos/lib/db/upload_locks_db.dart +++ b/mobile/apps/photos/lib/db/upload_locks_db.dart @@ -157,6 +157,23 @@ class UploadLocksDB { ); } + Future getLockData(String id) async { + final db = await instance.database; + final rows = await db.query( + _uploadLocksTable.table, + where: '${_uploadLocksTable.columnID} = ?', + whereArgs: [id], + ); + if (rows.isEmpty) { + return "No lock found for $id"; + } + final row = rows.first; + final time = row[_uploadLocksTable.columnTime] as int; + final owner = row[_uploadLocksTable.columnOwner] as String; + final duration = DateTime.now().millisecondsSinceEpoch - time; + return "Lock for $id acquired by $owner since ${Duration(milliseconds: duration)}"; + } + Future isLocked(String id, String owner) async { final db = await instance.database; final rows = await db.query( diff --git a/mobile/apps/photos/lib/utils/file_uploader.dart b/mobile/apps/photos/lib/utils/file_uploader.dart index 9bb28eeee4..890b167fea 100644 --- a/mobile/apps/photos/lib/utils/file_uploader.dart +++ b/mobile/apps/photos/lib/utils/file_uploader.dart @@ -519,7 +519,8 @@ class FileUploader { DateTime.now().microsecondsSinceEpoch, ); } catch (e) { - _logger.warning("Lock was already taken for " + file.toString()); + final lockInfo = await _uploadLocks.getLockData(lockKey); + _logger.warning("Lock was already taken ($lockInfo) for " + file.tag); throw LockAlreadyAcquiredError(); } From 568c5393a8d84eda1e874941ec2bbc0142cc4c21 Mon Sep 17 00:00:00 2001 From: NylaTheWolf <41797151+NylaTheWolf@users.noreply.github.com> Date: Mon, 4 Aug 2025 15:25:36 -0400 Subject: [PATCH 02/10] Fix broken link to adding-icons.md in CONTRIBUTING.md The link to the adding-icons.md file was broken, so I fixed it. --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f4b90454e2..83203d474e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -48,7 +48,7 @@ See [docs/](docs/README.md) for how to edit these documents. ## Code contributions -If you'd like to contribute code, it is best to start small. Consider some well-scoped changes, say like adding more [custom icons to auth](auth/docs/adding-icons.md), or fixing a specific bug. +If you'd like to contribute code, it is best to start small. Consider some well-scoped changes, say like adding more [custom icons to auth](mobile/apps/auth/docs/adding-icons.md), or fixing a specific bug. Code that changes the behaviour of the product might not get merged, at least not initially. The PR can serve as a discussion bed, but you might find it easier to just start a discussion instead, or post your perspective in the (likely) existing thread about the behaviour change or new feature you wish for. From 0d139df6520d715e44ce86f0b4989baae05dd68b Mon Sep 17 00:00:00 2001 From: NylaTheWolf <41797151+NylaTheWolf@users.noreply.github.com> Date: Mon, 4 Aug 2025 15:30:14 -0400 Subject: [PATCH 03/10] Added Smogon icon --- .../auth/assets/custom-icons/icons/Smogon.svg | 170 ++++++++++++++++++ 1 file changed, 170 insertions(+) create mode 100644 mobile/apps/auth/assets/custom-icons/icons/Smogon.svg diff --git a/mobile/apps/auth/assets/custom-icons/icons/Smogon.svg b/mobile/apps/auth/assets/custom-icons/icons/Smogon.svg new file mode 100644 index 0000000000..6d4d656c88 --- /dev/null +++ b/mobile/apps/auth/assets/custom-icons/icons/Smogon.svg @@ -0,0 +1,170 @@ + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file From e95aa5533905b323574cf2268551ee63c4509b6d Mon Sep 17 00:00:00 2001 From: NylaTheWolf <41797151+NylaTheWolf@users.noreply.github.com> Date: Mon, 4 Aug 2025 15:32:06 -0400 Subject: [PATCH 04/10] Added Smogon icon (filename fixed) The previous file name was "Smogon.svg." This time it's all lowercase. --- .../auth/assets/custom-icons/icons/smogon.svg | 170 ++++++++++++++++++ 1 file changed, 170 insertions(+) create mode 100644 mobile/apps/auth/assets/custom-icons/icons/smogon.svg diff --git a/mobile/apps/auth/assets/custom-icons/icons/smogon.svg b/mobile/apps/auth/assets/custom-icons/icons/smogon.svg new file mode 100644 index 0000000000..6d4d656c88 --- /dev/null +++ b/mobile/apps/auth/assets/custom-icons/icons/smogon.svg @@ -0,0 +1,170 @@ + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file From 8d484528e76acc1b3586296c20eb59cff5647aab Mon Sep 17 00:00:00 2001 From: NylaTheWolf <41797151+NylaTheWolf@users.noreply.github.com> Date: Mon, 4 Aug 2025 15:32:50 -0400 Subject: [PATCH 05/10] Delete mobile/apps/auth/assets/custom-icons/icons/Smogon.svg --- .../auth/assets/custom-icons/icons/Smogon.svg | 170 ------------------ 1 file changed, 170 deletions(-) delete mode 100644 mobile/apps/auth/assets/custom-icons/icons/Smogon.svg diff --git a/mobile/apps/auth/assets/custom-icons/icons/Smogon.svg b/mobile/apps/auth/assets/custom-icons/icons/Smogon.svg deleted file mode 100644 index 6d4d656c88..0000000000 --- a/mobile/apps/auth/assets/custom-icons/icons/Smogon.svg +++ /dev/null @@ -1,170 +0,0 @@ - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file From f1f84af3a7cc147b5aba991813be26f46184e826 Mon Sep 17 00:00:00 2001 From: NylaTheWolf <41797151+NylaTheWolf@users.noreply.github.com> Date: Mon, 4 Aug 2025 15:40:27 -0400 Subject: [PATCH 06/10] Add Smogon to custom-icons.json --- mobile/apps/auth/assets/custom-icons/_data/custom-icons.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mobile/apps/auth/assets/custom-icons/_data/custom-icons.json b/mobile/apps/auth/assets/custom-icons/_data/custom-icons.json index fc558cf8f5..a98501c3e9 100644 --- a/mobile/apps/auth/assets/custom-icons/_data/custom-icons.json +++ b/mobile/apps/auth/assets/custom-icons/_data/custom-icons.json @@ -1505,6 +1505,9 @@ { "title": "Skinport" }, + { + "title": "Smogon" + }, { "title": "SMSPool", "slug": "sms_pool_net", @@ -1908,4 +1911,4 @@ "slug": "cowheels" } ] -} \ No newline at end of file +} From 824b071af4a0d5bf849a53ff4e9ac66d380d673b Mon Sep 17 00:00:00 2001 From: NylaTheWolf <41797151+NylaTheWolf@users.noreply.github.com> Date: Mon, 4 Aug 2025 16:28:45 -0400 Subject: [PATCH 07/10] Added more icons Icons for Twitter (before rebrand), Art Fight, Toyhouse, Animal Crossing, Best Buy, and Chucklefish. I wasn't able to find an official SVG of Toyhouse's icon or get it through inspect element, but I got it from here: https://logos.fandom.com/wiki/Toyhouse Animal Crossing Leaf: Nintendo, Public domain, via Wikimedia Commons Original Twitter logo: Martin Grasser, per source, Apache License 2.0 , via Wikimedia Commons Best Buy: Best Buy, Public domain, via Wikimedia Commons Chucklefish: https://en.wikipedia.org/wiki/File:Chucklefish.svg (Warns that this is not a free logo) --- .../custom-icons/icons/animal_crossing.svg | 1 + .../assets/custom-icons/icons/art_fight.svg | 307 ++++++++++++++++++ .../assets/custom-icons/icons/best_buy.svg | 13 + .../assets/custom-icons/icons/chucklefish.svg | 75 +++++ .../assets/custom-icons/icons/toyhouse.svg | 49 +++ .../assets/custom-icons/icons/twitter.svg | 4 + 6 files changed, 449 insertions(+) create mode 100644 mobile/apps/auth/assets/custom-icons/icons/animal_crossing.svg create mode 100644 mobile/apps/auth/assets/custom-icons/icons/art_fight.svg create mode 100644 mobile/apps/auth/assets/custom-icons/icons/best_buy.svg create mode 100644 mobile/apps/auth/assets/custom-icons/icons/chucklefish.svg create mode 100644 mobile/apps/auth/assets/custom-icons/icons/toyhouse.svg create mode 100644 mobile/apps/auth/assets/custom-icons/icons/twitter.svg diff --git a/mobile/apps/auth/assets/custom-icons/icons/animal_crossing.svg b/mobile/apps/auth/assets/custom-icons/icons/animal_crossing.svg new file mode 100644 index 0000000000..6800a4d8f7 --- /dev/null +++ b/mobile/apps/auth/assets/custom-icons/icons/animal_crossing.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/mobile/apps/auth/assets/custom-icons/icons/art_fight.svg b/mobile/apps/auth/assets/custom-icons/icons/art_fight.svg new file mode 100644 index 0000000000..51c4274bd4 --- /dev/null +++ b/mobile/apps/auth/assets/custom-icons/icons/art_fight.svg @@ -0,0 +1,307 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/mobile/apps/auth/assets/custom-icons/icons/best_buy.svg b/mobile/apps/auth/assets/custom-icons/icons/best_buy.svg new file mode 100644 index 0000000000..86717212e2 --- /dev/null +++ b/mobile/apps/auth/assets/custom-icons/icons/best_buy.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/mobile/apps/auth/assets/custom-icons/icons/chucklefish.svg b/mobile/apps/auth/assets/custom-icons/icons/chucklefish.svg new file mode 100644 index 0000000000..76be26a658 --- /dev/null +++ b/mobile/apps/auth/assets/custom-icons/icons/chucklefish.svg @@ -0,0 +1,75 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + + + + diff --git a/mobile/apps/auth/assets/custom-icons/icons/toyhouse.svg b/mobile/apps/auth/assets/custom-icons/icons/toyhouse.svg new file mode 100644 index 0000000000..f385ffbb27 --- /dev/null +++ b/mobile/apps/auth/assets/custom-icons/icons/toyhouse.svg @@ -0,0 +1,49 @@ + + + + diff --git a/mobile/apps/auth/assets/custom-icons/icons/twitter.svg b/mobile/apps/auth/assets/custom-icons/icons/twitter.svg new file mode 100644 index 0000000000..d60af2b8c5 --- /dev/null +++ b/mobile/apps/auth/assets/custom-icons/icons/twitter.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file From 12648ce726ea26706d8ab3fc99c29aa05e6a159f Mon Sep 17 00:00:00 2001 From: NylaTheWolf <41797151+NylaTheWolf@users.noreply.github.com> Date: Mon, 4 Aug 2025 17:00:23 -0400 Subject: [PATCH 08/10] Update custom-icons.json --- .../custom-icons/_data/custom-icons.json | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/mobile/apps/auth/assets/custom-icons/_data/custom-icons.json b/mobile/apps/auth/assets/custom-icons/_data/custom-icons.json index a98501c3e9..9301d65a2c 100644 --- a/mobile/apps/auth/assets/custom-icons/_data/custom-icons.json +++ b/mobile/apps/auth/assets/custom-icons/_data/custom-icons.json @@ -60,6 +60,15 @@ "slug": "amtrak", "hex": "003A5D" }, + { + "title": "Animal Crossing", + "slug:": "animal_crossing", + "altNames": [ + "AnimalCrossing", + "Bell Tree Forums", + "BellTree Forums" + ] + }, { "title": "Ankama", "slug": "ankama" @@ -81,6 +90,13 @@ "Docaposte AR24" ] }, + { + "title": "Art Fight", + "slug": "art_fight", + "altNames": [ + "ArtFight" + ] + }, { "title": "Aruba", "slug": "aruba", @@ -341,6 +357,9 @@ "slug": "cih", "hex": "D14633" }, + { + "title": "Chucklefish" + }, { "title": "Clipper", "slug": "clippercard", @@ -1667,6 +1686,12 @@ { "title": "TorGuard" }, + { + "title": "Toyhouse", + "altNames": [ + "Toyhou.se" + ] + }, { "title": "Trading 212" }, @@ -1702,6 +1727,12 @@ "Twitch tv" ] }, + { + "title": "Twitter", + "altNames": [ + "X", + ] + }, { "title": "Ubiquiti", "slug": "ubiquiti", From 11786057e257e3786059bb1efcda9023a9a343cc Mon Sep 17 00:00:00 2001 From: NylaTheWolf <41797151+NylaTheWolf@users.noreply.github.com> Date: Mon, 4 Aug 2025 17:10:34 -0400 Subject: [PATCH 09/10] Moving broken link fix to another pull request --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 83203d474e..f4b90454e2 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -48,7 +48,7 @@ See [docs/](docs/README.md) for how to edit these documents. ## Code contributions -If you'd like to contribute code, it is best to start small. Consider some well-scoped changes, say like adding more [custom icons to auth](mobile/apps/auth/docs/adding-icons.md), or fixing a specific bug. +If you'd like to contribute code, it is best to start small. Consider some well-scoped changes, say like adding more [custom icons to auth](auth/docs/adding-icons.md), or fixing a specific bug. Code that changes the behaviour of the product might not get merged, at least not initially. The PR can serve as a discussion bed, but you might find it easier to just start a discussion instead, or post your perspective in the (likely) existing thread about the behaviour change or new feature you wish for. From 047c2954f88c7ec7b451844bfcf6f4f55f4538a5 Mon Sep 17 00:00:00 2001 From: NylaTheWolf <41797151+NylaTheWolf@users.noreply.github.com> Date: Mon, 4 Aug 2025 17:25:11 -0400 Subject: [PATCH 10/10] Actually fix broken link in CONTRIBUTING.md It's easier to just put everything in one pull request. The link to the adding-icons.md file was broken, so I fixed it. --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f4b90454e2..83203d474e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -48,7 +48,7 @@ See [docs/](docs/README.md) for how to edit these documents. ## Code contributions -If you'd like to contribute code, it is best to start small. Consider some well-scoped changes, say like adding more [custom icons to auth](auth/docs/adding-icons.md), or fixing a specific bug. +If you'd like to contribute code, it is best to start small. Consider some well-scoped changes, say like adding more [custom icons to auth](mobile/apps/auth/docs/adding-icons.md), or fixing a specific bug. Code that changes the behaviour of the product might not get merged, at least not initially. The PR can serve as a discussion bed, but you might find it easier to just start a discussion instead, or post your perspective in the (likely) existing thread about the behaviour change or new feature you wish for.