Commit Graph

879 Commits

Author SHA1 Message Date
Vitor Pamplona
7dfa343ad8 Merge branch 'main' of https://github.com/vitorpamplona/amethyst
* 'main' of https://github.com/vitorpamplona/amethyst:
  New Crowdin translations by GitHub Action
  code simplification and deduplication
  code simplification and deduplication
  Add blurhash and dim to Nip96Uploader.kt
  added blurhash to blossom upload
  New Crowdin translations by GitHub Action
  Update README to mark video capture as complete
  Parse for video segments and exclude them from image gallery
  add VideoSegment and failing tests
  Fix location being added to note even after deselecting it
  optimise imports
  New Crowdin translations by GitHub Action
  update cs, de, sv, pt translations
  Revert "update buffer to 64kb"
  update buffer to 64kb
  Change length to Long from Int: avoids potential overflow, Long seems to be used everywhere else
  Create a CountingInputStream utility to avoid duplication Prevent INT overflow in BlossomUploader.kt Connection Cleanup in ImageDownloader.kt Added try-finally in Sha256Hasher.jvmAndroid.kt
  Add streaming hash utility function to quartz multiplatform, follow the existing pool/worker design Change hashing in ImageDownloader.kt to use streaming
  stream file to calculate both hash and size without loading it all at once

# Conflicts:
#	amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/lists/followsets/FollowSetScreen.kt
2025-11-04 19:28:45 -05:00
Vitor Pamplona
be804092d7 - Refactors people lists
- Adds people and follow list cache on the account class
- Updates TopNav to use the new caching
- Removes redundant viewModels for list feeds
- Adds the ability to add and remove users from the List screen
2025-11-04 19:24:24 -05:00
davotoula
5ce184d400 Merge branch 'main' into optimise-imports 2025-11-03 19:45:12 +01:00
Vitor Pamplona
f14b545947 Merge pull request #1531 from davotoula/1530-added-streaming-hashing-utility-to-avoid-OOM-on-large-files
Fix OutOfMemoryError for Large File Uploads
2025-11-03 12:38:38 -05:00
Vitor Pamplona
1411de32a0 Adds search of events and addresses in the Deletion Event 2025-10-31 18:43:45 -04:00
Vitor Pamplona
3eb662851b Adds a flatten to set utility 2025-10-31 18:36:05 -04:00
davotoula
c3c75b46a7 optimise imports 2025-10-30 19:20:02 +01:00
Vitor Pamplona
95cc0783fd Adds a req that returns the list of events in order of arrival 2025-10-29 18:30:00 -04:00
Vitor Pamplona
f9f7cdf12f Renames internal Req objects 2025-10-29 18:29:23 -04:00
Vitor Pamplona
40d417038e adds a Start request to the req listener 2025-10-29 18:28:59 -04:00
Vitor Pamplona
b8511b5ac3 Adds simplified methods to create Requests from NostrClient 2025-10-29 16:51:49 -04:00
greenart7c3
fb7610cafd Fix DecryptZapRequest CommandType 2025-10-29 14:38:54 -03:00
Vitor Pamplona
0705ee9581 Unifying the parser for the tag array 2025-10-28 13:05:57 -04:00
Vitor Pamplona
bf664ea0c5 Avoids interning of large strings and objects where the duplication is not common 2025-10-28 12:18:19 -04:00
Vitor Pamplona
39f3aef7b5 Don't intern signatures, content and tags since they are not usually duplicated 2025-10-28 12:11:34 -04:00
davotoula
7254dce3a9 Revert "update buffer to 64kb"
This reverts commit 4e31a9a5ac.
2025-10-26 10:25:40 +01:00
davotoula
4e31a9a5ac update buffer to 64kb 2025-10-26 00:09:17 +02:00
davotoula
2332623cde Create a CountingInputStream utility to avoid duplication
Prevent INT overflow in BlossomUploader.kt
Connection Cleanup in ImageDownloader.kt
Added try-finally in Sha256Hasher.jvmAndroid.kt
2025-10-25 23:43:24 +02:00
davotoula
93994564f6 Add streaming hash utility function to quartz multiplatform, follow the existing pool/worker design
Change hashing in ImageDownloader.kt to use streaming
2025-10-25 23:22:31 +02:00
Vitor Pamplona
67e3b05a42 Uses the new nostrnwc deep link for connections 2025-10-24 17:53:31 -04:00
Vitor Pamplona
ee80361478 - Removes the deprecated hacks from Contact Lists
- Removes the use of kind 3 to show hashtags which fixes issues when people unfollowing the hashtag and it would just affect the InterestListEvent
2025-10-22 18:31:00 -04:00
Vitor Pamplona
2ada3855d0 Remove imports 2025-10-22 16:28:20 -04:00
Vitor Pamplona
031e604923 Only avoids sending a message for the request state if it is a new open request 2025-10-21 20:17:04 -04:00
Vitor Pamplona
551bd344e0 Makes sure to trigger null pointer exception on message deserializer 2025-10-21 20:15:48 -04:00
Vitor Pamplona
c21b2ca60f Removes the choice of Dispatchers from Quartz 2025-10-21 20:15:05 -04:00
Vitor Pamplona
df54f7bb67 Moves all Dispatchers.Default to IO because of the amount of Synchronized code that blocks the thread underneath each coroutine and since Default only has the exact number of threads the processor offers, once they block, we lose computing power 2025-10-21 18:30:08 -04:00
Vitor Pamplona
e2b2b10994 - Separates a relay failure tracker to a module
- Updates finding the outbox relay set to include the set of connected relays before all of the relays.
2025-10-21 15:55:32 -04:00
Vitor Pamplona
a0cb2a7db6 Creates a default relay list for indexers in new accounts 2025-10-20 20:22:20 -04:00
Vitor Pamplona
f663bb78aa Reduce error log sizes 2025-10-20 18:41:43 -04:00
Vitor Pamplona
e4ce7415a3 Don't use "when" when just one line is needed 2025-10-20 17:13:11 -04:00
Vitor Pamplona
e45b4b11dc Restructuring Relay systems to:
- Maintain order of incoming messages for relay listeners
- Defers all processing of incoming messages to coroutines via channels, freeing OkHttp's thread as soon as possible.
- Simplifies the main relay class by using attached listener modules for each function of the relay client.
- Migrate defaultOnConnect calls to become listener based and moved to NostrClients
- Treat counts as query only, not subscriptions.
- Coordinates REQs so that if an update is required to be sent but the server has not finished processing events, waits for it to finish and sends it later as soon as EOSE or Close arrives
- Correctly sustain the local state of each Req.
- Creates an Account follow list per Relay state that only includes shared relays as a better source of functioning relays
- Changes UserLoading features in a tentative to make them faster since they are used by all functions in the app.
- Correctly marks EOSE for filters that are aligned with the Req State from NostrClient
- Avoid subsequent REQ updates before EOSE or CLOSE calls.
- Refactoring RelayClient listener to be not dependent of which module is active for a relay client.
- Refactors authenticators to do complete operation as a module
- Breaks down Relay Client modules (Auth, Reqs, Counts, Event submissions) in the Relay Pool class.
- Creates listeners just for special REQ situations
- Move statistics to outside the base relay class as a listener
- Move logs to outside the base relay class as a listener
- Better structures a Standalone Relay client
- More appropriately communicate errors to the listeners
- Remove relay state on listeners
2025-10-18 18:10:45 -04:00
Vitor Pamplona
e20afd39a3 Removing onClosing listener because it isn't being used. 2025-10-18 17:12:10 -04:00
Vitor Pamplona
4c633c7dec Merge branch 'main' of https://github.com/vitorpamplona/amethyst 2025-10-18 08:44:21 -04:00
Vitor Pamplona
990cca3d64 Moving the EmptyOTS resolver to Quartz for test cases 2025-10-17 14:29:46 -04:00
davotoula
5d6e7d1921 change from runBlocking to runTest where appropriate 2025-10-15 21:00:00 +02:00
Vitor Pamplona
7a05f527dd Moving Log.java to Log.kt 2025-10-14 15:18:45 -04:00
Vitor Pamplona
0668f2caa4 Updates Compose, Firebase, GMS, JNA, mock, okhttp, secp256, spotless, vico, zoomable, androidXCamera 2025-10-14 14:38:28 -04:00
Vitor Pamplona
4af576f5f4 Merge branch 'main' of https://github.com/vitorpamplona/amethyst 2025-10-14 14:15:38 -04:00
Vitor Pamplona
e422dcda50 Merge pull request #1519 from davotoula/1516-Private-Public-Bookmark-Removal-Issue
Private public bookmark removal issue
2025-10-14 13:42:42 -04:00
davotoula
3a3d1a6f25 bugfix: don't remove from public bookmarks when removing from private 2025-10-14 13:31:27 +02:00
davotoula
85bdf67ac3 added failing test: Public tags should be preserved when removing from private bookmarks 2025-10-14 13:21:46 +02:00
KotlinGeekDev
ba756c9acd Take into account profile membership when removing profile. 2025-10-13 20:30:18 +01:00
Vitor Pamplona
0fab3afea2 Moves static relay stats to a injectable object 2025-10-10 11:38:22 -04:00
Vitor Pamplona
0bc38c1fa4 Removes sub stats from the Subscription controller to move outside. 2025-10-10 11:34:25 -04:00
Vitor Pamplona
0c0410d1dd Adds an isValid function to all commands so we can check before sending 2025-10-10 11:33:18 -04:00
Vitor Pamplona
fa971b1822 Removes stats from Orchestrator to move out of the inner classes and be an option for app developers instead. 2025-10-10 11:31:32 -04:00
Vitor Pamplona
24f7d76dc4 Adds a Count reply message to relays 2025-10-10 11:17:43 -04:00
Vitor Pamplona
5c09cd0b55 Rejects additional urls with %20 and fixes Wss ones. 2025-10-10 10:55:46 -04:00
Vitor Pamplona
5975130824 Avoids logging at the BasicOkHttp level 2025-10-10 10:51:09 -04:00
Vitor Pamplona
0a23e23801 Moves quartz to Java 21 due to binary inconsistencies between the multiple builds of KMP (tests conflicting with main) 2025-10-10 10:49:35 -04:00