Commit Graph

47 Commits

Author SHA1 Message Date
0x330a 896907dadb feat: update protos and add a way to do toasts from DI 2023-11-22 12:16:21 +11:00
0x330a d162522ac2
feat: fix the invite order properly 2023-11-20 16:45:55 +11:00
0x330a abaa765207
feat: invite contact uses multiple contacts now, fix compile issues and write to members based on success / failure state and pending 2023-11-06 17:59:05 +11:00
0x330a ae7c27c2e0 feat: update libsession-util and get signCallbacks working for authenticated retrieve, handling incoming messages in new closed groups 2023-10-26 09:59:42 +11:00
0x330a d63b5f85df feat: in theory add in the subkey auth callbacks and make a default bytearray signer callback 2023-10-24 17:15:28 +11:00
0x330a ac18f1cbfe
Integrate shared libsession-util library (#1096)
* feat: add some config db basics and DI for it, make the user profile optional, start looking at integrate building from initial dump

* update: get latest util library submodule update

* refactor: fix compile for refactored API

* refactor: naming consistent with library

* feat: add in config storage and injection to common places, managing lifecycle of native instances

* refactor: config database changes, new protos, adding in support for config base namespace queries

* refactor: config query and store use the same format as other platforms

* feat: add batch snode calls and try to poll from all the config namespaces

* fix: add optional namespace in signature and params

* feat: add raw requests for modifying expiry and getting expiries

* feat: add some base config migration logic, start implementing wrappers for conversation and expiry types

* chore: update libsession base

* feat: start integrating conversation wrapper functions

* feat: add basic conversation info volatile types and implementations, start working on tests

* feat: more common library wrapper implementation and test

* fix: tests and compile issues

* fix: fix tests, don't use iterables

* feat: add all iterators and tests

* feat: add in more config factory for volatile

* feat: update request responses and their appropriate processing

* feat: add storage with hashes and some basic profile update logic in config factory probably move that somewhere else

* feat: adding config sync functionality, refactoring jobs to execute in suspend context to do some nice coroutine execution

* refactor: moving some properties around so we have access in libsession

* feat: expand on the config sync job, finish basic implementation to test against

* feat: add forced config sync

* feat: syncs the user profile stuff for now, and errors back to placeholder instead of unknown recipient

* feat: add basic message read logic for synchronizing last reads, need to modify the query to use the last seen instead of the unread count in a subquery possibly for thread display record

* feat: add broken unreads everywhere

* fix: unreads work now for incoming messages, need to sync conv volatile properly still

* feat: batching poll responses properly and handling groups properly

* fix: replace the mark read receiver (from notifications) to use the new set last seen mark read logic

* feat: update to the group list branch

* fix: compile errors from updating library to use latest branch, now requires cmake 3.22.1

* fix: fix the contact tests

* fix: getters weren't getters properly in the config factory, fixed new onboarding from configs

* feat: add the last seen

* feat: start adding user groups wrapper objects

* refactor: add more else branches for unimplemented types

* feat: buffer the last read when in conversation

* feat: add basic contact logic for setting local contact state. Need to implement handling properly

* refactor: trying to just include blocked status for now in updating contacts

* fix: add some more contact syncing: nicknames, approved statuses, blocked statuses

* feat: start implementing hashes in shared lib and refactoring

* feat: start to implement group list info classes and wrappers and refactor to use library based hashes

* feat: incorporate hashes from library, more wrapper for user groups and serialization from c++

* feat: adding more serialization changes for community base info and user groups LGC

* feat: adding more serialize deserialize to legacy closed groups

* feat: finish serial/deserial helper

* feat: just implement deserialize community info

* refactor: refactor tests and wrappers to use less pointers, finish implementing user groups API

* feat: finish latest wrappers fix tests and continue building default generation functions. refactor defaults to be used if no stored data blob in DB

* feat: more usergroup functionality, storage functionality for checking pinned status, adding pinned status for NTS/contacts, move community info parse full url to base community, add StorageProtocol logic for group info

* feat: adding user groups to the list of user configs, refactorign some of the config factory to fetch the user configs easier. Add handling for polling user group namespace

* feat: implement the default user config list

* feat: add user group config handling

* chore: extra missed existing group

* refactor: use existing lookup for objects in wrappers so they don't overwrite missing values

* feat: add contacts expiry serialization/deserialization, more LGC, timestamps to add closed group encryption info (for latest tracking)

* refactor: change how expiration timer works for contacts, set the expiration timer for those conversations in handling contact configs

* feat: add expiration updates via config for contacts as well

* feat: add almost all group editing cases, need to hook into the thread deletion for groups in the user groups

* feat: open group joining should work now

* feat: add groups to configs for push

* fix: handling user group updates bug fix for closed groups instead of all groups

* fix: open group sync persistence

* feat: add in activity finish if recipient no longer exists (deleted thread) from sync

* feat: support avatar removal from shared library

* feat: support thread deletion and refactoring a lot of getOrCreateThread references to go via storage or assume they are correctly set to hook into the contact and volatile creation during thread creation

* fix: database update not deleting in certain circumstances, storage persisting and removing the volatile convo info for thread deletion / creation, NTS hidden getter values in shared library

* refactor: make update listener visibility package

* refactor: update kotlin

* feat: update dependencies and support outdated config messages, refactor config factory to return null configs if new configs not supported

* feat: update shared library to use priority only, fix compile errors, fix group member sync problem

* fix: compile error

* fix: profile avatar fixes for local user now that we aren't setting local user profile key

* Revert "fix: profile avatar fixes for local user now that we aren't setting local user profile key"

This reverts commit 3f569e3403.

* refactor: let the local number update recipient details in profile manager

* fix: don't recreate thread after leaving

* fix: fix up the duplicate thread creation in the message receive handler

* fix: fix the placeholder rendering on new messages, add in extra context logging for adding contacts and preventing new thread creation on new messages of various types

* feat: add test theme for xml layout previews

* feat: add shortened hex for session IDs throughout, replace nullable getName with null in underlying contacts for individual contacts, build shared lib with release mode, remove todo, fix broken unit test

* feat: setup android unit tests for verifying storage behaviours and state of shared configs

* feat: adding dependencies to try and get android tests working, fixing bug with initial config not syncing properly

* fix: remove hilt testing, add spy on app context storage field instead, update libsession-util to fixed sodium cmake branch

* refactor: use PR version of libsession-util to test cmake build

* fix: new build on normal repo

* feat: new libsession util commit

* refactor: remove the old custom build libsodium stuff from cmake

* feat: update libsession module

* fix: add legacy config subscription to the home activity to enable showing banner at any time

* fix: pinned status for communities and groups, group last read time being set to snodeapi.now on finish joining

* fix: some open group volatile convo fix for last read timer being set. Need to investigate further

* fix: prevent blocking local number

* fix: adding in more checks for open group inbox recipients before being saved to the shared configs. Prevent sending typing indicator for blocked users

* fix: add blocked check for read receipt and updating expiring messages

* fix: another contact recipient config library call removed for non-standard IDs

* fix: another ID check

* fix: don't process thread creation for user is sender && recipient (sync message) for message request responses

* refactor: mark as read on open and use less buffer time

* fix: finally fix the darn unread count issue by

* fix: removing debug logs, adding failure error handling logs for expiry message updater, properly using the message thread ID created for the expiring messages. Process the non-thread messages properly with await in BatchMessageReceiveJob

* fix: checking the last read open to message and make sure that scroll behaviour matches expected, fix the config sync job not deleting ALL old hashes only latest

* refactor: try to add a retry logic to config sync job in case of snode failure

* build: update submodule

* fix: remove user notifications for leaving group to prevent synced device issues, don't create thread in messages for new closed groups, includei nactive groups in the deletion queries for merging group configs

* feat: use blinded message count for banner also

* refactor: remove some logging, don't use blinded conversations in the list

* fix: don't set the read flag in update notifications, some roundabout logic for first loads and scrolling to last known positions

* refactor: merge changes, re-add the group check in unapproved messages

* fix: re-poll on fail in case that was breaking anything

* fix: pinning groups and notifying list listeners in threadDb.setPinned

* feat: add in TTL extension subrequest and builder, enable extending TTLs for all latest config messages in poll as subrequest

* feat: add block to the delete all message requests, only if they're not open group inbox contacts

* refactor: disable edit text for non contacts

* refactor: let the user display name return "You" for local user

* fix: prevent NTS self create thread on user view bind

* refactor: remove populate public key cache if needed call which seems unnecessary at that point, maybe UserView refs have changed since 2020

* refactor: use just first visible instead of completely visible, merge message sender changes

* fix: prevent block of users in delete all

* fix: self sync sync message failures for default values

* feat: update libsession-util, adjust docs, update mms and sms to use message sent timestamp instead of -1 for last read in the thread

* fix: some compile issues in tests and some TODOs for things to do before merge

* fix: handle recyclerview scrolled on scroll to first unread if it's the first load

* fix: added more migration code for deleting unnecessary threads and groups, fixed a post-migration last seen issue on last item (current read is now), comment out actual network sync while testing migrations

* feat: adding a force new configs flag and logic for timestamp handling / forced configs, fix issue with handling legacy messages

* refactor: re-add the sending of configs

* fix: don't add contacts if they don't exist in the profile manager

* [wip]
fix: trying to consolidate prof pic and key properly

* feat: add logs and fix compile issue with a themes.xml entry, add removing profile picture into logic for profile manager

* fix: force has sent for local user, only prevent setting last seen for open group recipients, allow empty user pics to trigger config sync in settings

* fix: nts threads

* fix: open group avatar loop for open groups we have left

* feat: add a wrapper hash to track home diff util changes for wrapper contact recipient info, add test for dirty state in double set

* feat: add a dump in there as well

* refactor: more test code refactor

* fix: update last seen if later than current

* fix: open group threads and avatar downloads

* fix: add max size and maybe fix the non-200 sub requests for batches (for 421s in particular)

* fix: open group comparison issues potentially, have to update some more outgoing message open group flags for visibility of details etc

* Updated to the latest libSession-util

* Updated logic to delete legacy groups when kicked/left

* Added the legacy group 'joined_at' value

* Replaced incorrect character in JNI

* Fixed an issue where the group keyPair was getting encoded incorrectly

* Updated the code to ignore outdated legacy group control message changes

* Updated the code to ignore messages invalidated by the config

* [Review] Updated the poller to process config messages before standard

* Cleaned up the outdated message logic

* Fixed inverted config dropping flags

* Fixed an issue where the joining a community would read all messages

Stopped using a reversed RecyclerView in all cases (caused the unread issue)
Updated the logic to jump to the newly sent message when sending a message (to be consistent with other platforms)
Updated the logic to refresh the DB unread count when the cursor receives an update

* Updated the conversation to highlight the first unread message on open

* Fixed a couple of bugs with the highlighting

* Fixed a bug where the user profile picture wasn't downloading correctly

* feat: add all namespaces to delete all messages request and signature verification data

* fix: merge namespace hashes for signature returned and

* fix: import correct scroll to bottom

* build: update version code and name

* fix: initial contact generation fix for existing blinded contacts

* fix: initial convo generation fix for existing blinded convos (?)

* fix: conversation unread not doing a check for standard ID prefix

* fix: thread ID not being created for legacy config messages

* fix: don't treat 404 as bad snode

* fix: don't add retrieve profile job if we have one for that address

* build: update build code

* fix: reduce attempts for downloading image, invert unreachable type check

* fix: attempting to fix preventing message processing if group thread is not active for closed groups and initial contact dump only allows conversations with thread, may need further optimisations though

* feat: Added an unread marker and search result focus highlighting

* fix: empty set in appropriate places for current closed groups

* build: update build version code

* fix: fix the notifications and request at appropriate time

* refactor: remove debug logging for thread create and delete

* build: update build number

* fix: new community doesn't break persisting config if the .add request fails

* build: trying to track down broken retrieve avatar job

* feat: update to latest libsession dev

* fix: maybe fix avatar download for new messages

* fix: 404s causing snode errors and trying to retrieve avatars that have already 404'd a lot

* fix: closed group creation sets thread date to formation timestamp

* build: update version code

* build: update version code

* build: remove debuggable release build

* fix: use new permissions for external attachments

* build: update version code

* chore: remove debug logs

* fix: tests and main thread blocking db fetch for path status view

* wip: trying to track down failure to mark conversation as read in delayed group add

* wip: add more logs for initial last Read sync of communities

* wip: maybe the volatile is being updated with 0 on batch message receive?

* fix: maybe syncing read statuses are working now

* chore: remove debug logs

* build: update build number

* fix: trying to improve performance

* fix: add close to banner

* refactor: hide seed reminder in preview

* build: update build number

* fix: maybe requires update thread no matter what

* fix: message request banner shows again

* fix: android tests work again and permissions

* fix: blocked contacts click handler being overridden by something

* Revert "fix: blocked contacts click handler being overridden by something"

This reverts commit 608572fc42.

* build: update build number

* refactor: remove unused dependencies and update minor for sqlcipher

* fix: actually do insert contact, because otherwise name doesn't get set properly

* fix: maybe fix scroll to bottom issue

* build: update build number

* fix: the message time and jump to message queries are more optimized

* fix: maybe fix the last seen issues

* build: update build number

* fix: pfp broken closed groups why

* fix: add admins and members as member list instead of just members

* fix: exclude lgc without membership > 1 and inactive explicitly

* fix: submodule update

* fix: compiles with removal of iterator erase

* fix: unread indicator updates properly in ConversationActivityV2

* fix: unread notifications clear and altered if any notifications exist (prevents clearing read notifications in conversation or on home screen)

* refactor: profile pictures kinda broken

* build: update build number

* refactor: remove full hash from log

* fix: isPinned threadDB call

* refactor: use mutex in all libsession native calls, change timestamp

* refactor: add basic support for blinded v2 prefixes

---------

Co-authored-by: Morgan Pretty <morgan.t.pretty@gmail.com>
2023-07-14 18:27:13 +10:00
ryanzhao fa71ea1850 make RetrieveProfileAvatarJob work 2023-05-09 14:14:49 +10:00
Morgan Pretty 0256735135 Fixed a few bugs, added logging and removed some old code
Added the ability to copy the sessionId of open group URL from the conversation menu
Added additional logging to the BatchMessageReceiveJob to make future debugging easier
Removed the OpenGroupMigrator
Updated the JobQueue logging to provide more insight
Fixed an issue where the database migrations weren't blocking which could result in failing/crashing SQL queries
Fixed an issue where the new database file wouldn't be removed if a migration error was thrown
Fixed an issue where the new database could exist in an invalid state and the app wouldn't attempt to remigrate
Fixed an incorrectly throw exception in the PassphrasePromptActivity
2023-02-03 13:33:52 +11:00
Morgan Pretty ebe8479e4c Resolved PR comments 2023-01-23 16:14:50 +11:00
Morgan Pretty 810430e806 Fixed a couple of issues with the OpenGroupDeleteJob
Updated the OpenGroupDispatcher to have a thread limit of 8 (was previously unlimited which could result in the app getting flooded with threads under certain conditions)
Updated the OpenGroupDeleteJob to do bulk deletions (instead of individual message deletions)
Updated the OpenGroupDeleteJob to catch and report failures (wasn't previously happening)
2023-01-20 09:02:59 +11:00
Harris 7a773016da
New app theming (#913)
* feat: start new app theming feature

* feat: add some theming colours

* refactor: start refactoring themes and colours to use dynamic attributes

* feat: adding more colours and switching over default colours to be theme based instead of hard-coded or day/night specific

* refactor: take a look at ocean light and logo colour

* feat: global search colours for light and dark ocean

* feat: more styling

* feat: adding themes to conversation activity and refactoring the base theme to apply over the top of the activity's theme so it retains noActionBar etc

* feat: add dynamic accent color

* docs: add todo for changing how accent colour is applied

* feat: update new theming to use override primary style so that the regular colorAccent attribute can be used in existing layouts

* feat: coordinating styles across layouts, fixing up pinned icons and naming for conversation list items

* refactor: re-styling layouts to match new themes and attributes. Need to figure out action mode close button

* refactor: remove @color/text and replace with ?android:textColorPrimary to override in themes

* refactor: add context theme wrapper to bottom sheet dialog that references accent color

* fix: input bar bug fix and preference activity themes

* refactor: new settings menu options

* fix: crash for PNModeActivity.kt

refactor: move ordering in seed dialog to match designs, copy changes to match new settings menu

* feat: add new appearance settings activity

* refactor: title and VM changes

* fix: correct override

* feat: add theme appearance screen UI features and start VM implementation. re-add legacy theme utils to get default for migration

* fix: compile errors and missing themes from emoji features

* refactor: remove background shape alteration and old bottom sheet styles, re-add the theme mode attr

* feat: appearance screen wired up, just need to refresh theme

* feat: add theme state recreation and fix match system settings option

* refactor: add bottom margin

* feat: explore custom preference category

* feat: add the customized session theme for CorrectedPreferenceFragment

* feat: replace AppProtectionPreferenceFragment to extend ListSummaryPreferenceFragment

* refactor: change drawable style and remove explicit dividers

* refactor: remove divider in CorrectedPreferenceFragment

* feat: add theme state check on resume, might be jarring currently

* feat: add preference divider elements for settings menu

* refactor: settings menu redesigns

* refactor: change led preference to integer and refactor TextSecurePreferences.kt

* feat: add scroll parcel to save/restore hierarchy on restart with appearance changes

* feat: add the conversations blocked contacts and refactor preference order and copy

* feat: add blocked contacts activity, basic layout and vm

* feat: add unblock DB functions and storage protocol, start working on the DB query state flow, might have to just implement recipient on modified listener

* feat: add blocked contacts and notif recipient listeners

* feat: add recipient db reader

* feat: add blocked contact interactions and fix a theming crash for notifications

* feat: introduce better equals and hashcode implementations to recipient, replace home diff util content check with hashcode-based comparison

* feat: add settings menu vectors

* fix: preview compile error

* refactor: migrating settings menu to new designs

* feat: help menu

* refactor: simplify link opening

* refactor: remove space

* feat: refactor preferences and start theming for light mode options

* refactor: fixing dark and light modes with dialogs

* refactor: popup dialogs use proper themes now

* refactor: alert dialogs and media edit fragments use attribute references

* refactor: use input bar button attribute instead color control normal in vector tint

* refactor: transparency, dialog fixes, notification fix

* refactor: attrs and styles for buttons

* fix: use prominent button color on the outline button's border

* fix: fix the trash

* refactor: remove the appearance

* refactor: avatar placeholder generation, chips and element border styles

* refactor: use colors instead of style references

* refactor: theming changes to match designs and feedback

* refactor: the titles are bold and the categories are tertiary coloured now

* fix: appearance settings match preferences, search bottom bar uses themed attributes

* refactor: increase setting button height

* Update clear all data dialog

* Update seed dialog

* refactor: more qa feedback changes

* feat: add new TLs and fa-rIR TLs

* Update notification content dialog

* Fix message requests clear all button text color

* feat: re-add screenshot observer

* refactor: make send tint accent color

* feat: add unread background differences

* fix: change unread count indicator

* build: upgrade build numbers

* Fix message requests popupmenu background color

* fix: crash from attr reference in color attribute

* build: upgrade build number

* fix: message bubbles, thumbnail backgrounds, search bar visibility with input bar, attachment buttons

* fix: tertiary text for keyboard page search view

* fix: emoji overflow colour differences

* fix: reaction pill dialog background is now correct colour

* Add style to reactions tab layout

* fix: appearance activity reverting primary color at correct time

* fix: show call privacy warning every time instead of just once

* fix: gradient background(?) and audio autoplay disable

* fix: crash in all media containing documents

* fix: reaction dialog heading fixes

* Add style to reactions tab layout

* fix: remove gradient backgrounds

* fix: adding new reaction normal text attribute to try correct the tab layout

* fix: ocean dark unread/read colours

* build; update build number

* build: update build number

Co-authored-by: charles <charles@oxen.io>
2022-10-12 17:05:55 +11:00
Harris 919bb01d58
Make the message trimming behaviour consistent across platform (#936)
* refactor: remove old trim behaviour and create new defaults

* refactor: add in trimming by before time

* refactor: remove old trim thread job, remove message processor scheduling trim thread

* refactor: remove spacing

* refactor: enable trimming by default

* refactor: remove trim now option in chat preference
2022-09-13 15:01:15 +10:00
Harris 6ddefb7a2e
Performance improvements and bug fixes (#869)
* refactor: fail on testSnode instead of recursively using up snode list. add call timeout on http client

* refactor: refactoring batch message receives and pollers

* refactor: reduce thread utils pool count to a 2 thread fixed pool. Do a check against pubkey instead of room names for oxenHostedOpenGroup

* refactor: caching lib with potential loader fixes and no-cache for giphy

* refactor: remove store and instead use ConcurrentHashMap with a backing update coroutine

* refactor: queue trim thread jobs instead of add every message processed

* fix: wrapping auth token and initial sync for open groups in a threadutils queued runnable, getting initial sync times down

* fix: fixing the user contacts cache in ConversationAdapter.kt

* refactor: improve polling and initial sync, move group joins from config messages into a background job fetching image.

* refactor: improving the job queuing for open groups, replacing placeholder avatar generation with a custom glide loader and archiving initial sync of open groups

* feat: add OpenGroupDeleteJob.kt

* feat: add open group delete job to process deletions after batch adding

* feat: add vacuum and fix job queue re-adding jobs forever, only try to set message hash values in DB if they have changed

* refactor: remove redundant inflation for profile image views throughout app

* refactor(wip): reducing layout inflation and starting to refactor the open group deletion issues taking a long time

* refactor(wip): refactoring group deletion to not iterate through and delete messages individually

* refactor(wip): refactoring group deletion to not iterate through and delete messages individually

* fix: group deletion optimisation

* build: bump build number

* build: bump build number and fix batch message receive retry logic

* fix: clear out open group deletes

* fix: update visible ConversationAdapter.kt binding for initial contact fetching and better traces for debugging background jobs

* fix: add in check for / force sync latest encryption key pair from linked devices if we already have that closed group

* Rename .java to .kt

* refactor: change MmsDatabase to kotlin to make list operations easier

* fix: nullable type

* fix: compilation issues and constants in .kt instead of .java

* fix: bug fix expiration timer on closed group recipient

* feat: use the job queue properly across executors

* feat: start on open group dispatcher-specific logic, probably a queue factory based on openGroupId if that is the same across new message and deletion jobs to ensure consistent entry and removal

* refactor: removing redundant code and fixing jobqueue per opengroup

* fix: allow attachments in note to self

* fix: make the minWidth in quote view bind max of text / title and body, wrapped ?

* fix: fixing up layouts and code view layouts

* fix: remove TODO, remove timestamp binding

* feat: fix view logic, avatars and padding, downloading attachments lazily (on bind), fixing potential crash, add WindowDebouncer.kt

* fix: NPE on viewModel recipient from removed thread while tearing down the Recipient observer in ConversationActivityV2.kt

* refactor: replace conversation notification debouncer handler with handlerthread, same as conversation list debouncer

* refactor: UI for groups and poller improvements

* fix: revert some changes in poller

* feat: add header back in for message requests

* refactor: remove Trace calls, add more conditions to the HomeDiffUtil for updating more efficiently

* feat: try update the home adapter if we get a profile picture modified event

* feat: bump build numbers

* fix: try to start with list in homeViewModel if we don't have already, render quotes to be width of attachment slide view instead of fixed

* fix: set channel to be conflated instead of no buffer

* fix: set unreads based off last local user message vs incrementing unreads to be all amount

* feat: add profile update flag, update build number

* fix: link preview thumbnails download on bind

* fix: centercrop placeholder in glide request

* feat: recycle the contact selection list and profile image in unbind

* fix: try to prevent user KP crash at weird times

* fix: remove additional log, improve attachment download success rate, fix share logs dialog issue
2022-06-08 17:12:34 +10:00
ceokot c113a447cf
refactor: Use view binding to replace Kotlin synthetics (#824)
* refactor: Migrate home screen to data binding

* Add view binding

* Migrate ConversationView to view binding

* Migrate ConversationActivityV2 to view binding

* View model refactor

* Move more functionality to the view model

* Add ui state events flow

* Update conversation item bindings

* Update profile picture view bindings

* Replace Kotlin synthetics with view bindings

* Fix qr code fragment binding and optimize imports

* View binding refactors

* Make TextSecurePreferences an interface and add an implementation to improve testability

* Add conversation repository

* Migrate remaining TextSecurePreferences functions into the interface

* Add unit conversation unit tests

* Add unit test coverage for remaining view model functions
2022-01-14 07:56:15 +02:00
ceokot 44f5684b21
feat: Update open group avatars periodically (#807)
* feat: Update open group avatars periodically

* Updated timestamp

* Existing job check

* Refresh avatar on the conversation

* Remove println statement

* Update profile picture on recipient modified event
2021-12-15 08:11:55 +02:00
Harris f56a16b31d refactor: remove pubkey logs from poller log spam and move attachment download job to rx queue 2021-10-06 13:56:13 +11:00
Harris e036344c76 refactor: performance improvements in batch message processing, synchronized cache access and audible message notifications.
Increase audible timeout on DefaultMessageNotifier.java, don't send in-thread notification based on last audible notification.

Create a batch message receive job to handle up to 20 chunked messages at a time per job instead of singular or open group poll amount

Remove synchronized access to recipient cache and replace with a concurrent cache that's lock free from perf tracing monitor contention
2021-09-29 15:29:24 +10:00
jubb fa06a57ec3 fix: getting local user's ID if message is outgoing to check against that value in attachment download 2021-07-09 16:04:06 +10:00
jubb 9dfd051e63 feat: trust dialog and processing attachments for users after trusting them 2021-07-09 15:13:43 +10:00
jubb f4e5e5e36a fix: duplicate message send bug on attachments 2021-07-05 15:00:32 +10:00
jubb efa36d4cea refactor: trim thread is now queued after batch processing messages, for other conversations still after every persisted message
migrate TrimThreadJob.kt to new job system

deleting more open group references in removal

open group last message / last deletion now sets after processing vs after fetching
2021-05-26 15:22:19 +10:00
Niels Andriesse a88322a033 Move files 2021-05-18 09:12:33 +10:00
jubb 8b5134b9ef fix: fixes the failing insertions possibly composite PK related 2021-05-14 15:55:38 +10:00
Niels Andriesse 3cab81c329 Fix message send job attachment upload handling 2021-05-13 09:38:39 +10:00
jubb edc1454609 fix: unnamed open groups being processed by creating new threads after deletion
job db not marking successful/unsuccessful properly

handling send and receive better / in order
2021-05-12 16:48:18 +10:00
jubb 84fa3dfc86 Merge remote-tracking branch 'upstream/dev' into background_job_improvements
# Conflicts:
#	libsession/src/main/java/org/session/libsession/messaging/jobs/Job.kt
#	libsession/src/main/java/org/session/libsession/messaging/jobs/JobQueue.kt
#	libsession/src/main/java/org/session/libsession/messaging/jobs/MessageSendJob.kt
2021-05-12 16:31:53 +10:00
nielsandriesse bb850cf99e Minor job type refactoring 2021-05-12 16:17:25 +10:00
jubb 9f09977160 refactor: remove registration required for job serialization and test logs, don't try to read class object if the message send class is not of expected type 2021-05-12 10:43:17 +10:00
jubb e7377d640f fix: use AttachmentUploadJob instead of two download job keys in all types 2021-05-07 13:36:35 +10:00
jubb 4fff5ac2dc refactor: make storage reference jobId by string in deletion, don't persist jobs we are about to delete, delete jobs that fail to serialize from storage (probably from corrupt or moved data classes) in temporary message send jobs 2021-05-07 11:48:03 +10:00
jubb 51554f1cdf Merge remote-tracking branch 'upstream/dev' into open_groups_V2, working on compact poller implementation
# Conflicts:
#	app/src/main/java/org/thoughtcrime/securesms/conversation/ConversationActivity.java
#	app/src/main/java/org/thoughtcrime/securesms/conversation/ConversationFragment.java
#	app/src/main/java/org/thoughtcrime/securesms/database/Storage.kt
#	app/src/main/java/org/thoughtcrime/securesms/loki/activities/HomeActivity.kt
#	app/src/main/java/org/thoughtcrime/securesms/loki/api/BackgroundPollWorker.kt
#	app/src/main/java/org/thoughtcrime/securesms/loki/api/PublicChatManager.kt
#	app/src/main/java/org/thoughtcrime/securesms/loki/database/LokiThreadDatabase.kt
#	app/src/main/java/org/thoughtcrime/securesms/loki/protocol/MultiDeviceProtocol.kt
#	app/src/main/java/org/thoughtcrime/securesms/loki/utilities/MentionManagerUtilities.kt
#	app/src/main/java/org/thoughtcrime/securesms/loki/utilities/OpenGroupUtilities.kt
#	app/src/main/java/org/thoughtcrime/securesms/loki/views/MentionCandidateView.kt
#	app/src/main/java/org/thoughtcrime/securesms/loki/views/ProfilePictureView.kt
#	libsession/src/main/java/org/session/libsession/messaging/StorageProtocol.kt
#	libsession/src/main/java/org/session/libsession/messaging/jobs/AttachmentDownloadJob.kt
#	libsession/src/main/java/org/session/libsession/messaging/jobs/AttachmentUploadJob.kt
#	libsession/src/main/java/org/session/libsession/messaging/mentions/MentionsManager.kt
#	libsession/src/main/java/org/session/libsession/messaging/messages/Destination.kt
#	libsession/src/main/java/org/session/libsession/messaging/open_groups/OpenGroupAPIV2.kt
#	libsession/src/main/java/org/session/libsession/messaging/open_groups/OpenGroupMessageV2.kt
#	libsession/src/main/java/org/session/libsession/messaging/open_groups/OpenGroupV2.kt
#	libsession/src/main/java/org/session/libsession/messaging/sending_receiving/MessageSender.kt
#	libsession/src/main/java/org/session/libsession/messaging/sending_receiving/ReceivedMessageHandler.kt
#	libsession/src/main/java/org/session/libsession/messaging/utilities/DotNetAPI.kt
#	libsession/src/main/java/org/session/libsession/snode/OnionRequestAPI.kt
#	libsession/src/main/java/org/session/libsession/snode/SnodeAPI.kt
#	libsession/src/main/java/org/session/libsession/snode/SnodeMessage.kt
#	libsession/src/main/java/org/session/libsession/utilities/mentions/MentionsManager.kt
#	libsignal/src/main/java/org/session/libsignal/service/loki/api/SwarmAPI.kt
#	libsignal/src/main/java/org/session/libsignal/service/loki/api/opengroups/PublicChat.kt
#	libsignal/src/main/java/org/session/libsignal/service/loki/utilities/mentions/MentionsManager.kt
2021-04-28 17:41:30 +10:00
jubb 5d8f036f82 fix: attachment downloads and uploads
enable multi-threaded attachment handling for messages to speed up download/upload and free up message processing queue.

leaving group removes appropriate entries now in threaddb
2021-04-27 17:29:37 +10:00
Niels Andriesse 17e764fc31 Clean 2021-04-26 11:14:45 +10:00
Niels Andriesse 676c307412 Clean 2021-04-26 10:58:48 +10:00
Harris d3ca54ce86 fix: address job.id properly in persistence 2021-04-14 12:26:34 +10:00
jubb f723069775 fix: check actual collisions instead of not 2021-04-09 14:19:48 +10:00
jubb 3b2589b835 refactor: use a shared timer in JobQueue.kt 2021-04-06 17:09:21 +10:00
jubb 3654d1731c fix: various fixes wrt open groups, config messages, job queueing 2021-03-30 16:23:12 +11:00
jubb 2460afd1a8 feat: call resume message send on app create 2021-03-18 13:36:56 +11:00
jubb dd8a0cdc2e fix: use queue in the retry timer 2021-03-16 09:44:55 +11:00
jubb 323fb75149 fix: adding some message receive functionality 2021-03-12 17:15:33 +11:00
ryanzhao 4156c10feb Implement multi device & closed group protocol in refactored sending & receiving pipeline 2021-02-10 16:48:03 +11:00
ryanzhao 307da3b2be clean logging 2021-02-03 12:22:40 +11:00
Brice 49f3e0cfca implementation of persistAttachments + refactoring 2021-01-29 11:16:53 +11:00
Ryan ZHAO 4c1df33059 job related 2020-12-10 15:31:38 +11:00
Ryan ZHAO bfb16c581a WIP: refactor jobs (basic) 2020-12-02 16:39:02 +11:00
Ryan ZHAO 7a66a47520 restructure and unite service android/java to libsignal 2020-11-26 09:46:52 +11:00
Renamed from sessionmessaging/src/main/java/org/session/messaging/jobs/JobQueue.kt (Browse further)