Commit Graph

86 Commits

Author SHA1 Message Date
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
Harris 00f06ab034
Namespace retrieval and storage with auth (#880)
* feat: add migration and fork info for upcoming auth and closed group retrieval updates

* feat: add closed group poller calls and include namespace to parse raw messages function

* feat: add DB upgrades and queries for namespaces

* fix: fix the polling for post-HF signatures and group messages

* fix: realise we need a compound key for namespaces in received hashes, test explicitly setting namespace

* feat: add setForkInfo implementation

* refactor: include default fork info command on create, refactor migration to use new table since we can't add constraints in alter for PK, replace `lastHash` with `last_hash` in case that fixes paging

* refactor: include namespace and use when statement for closed group polling

* refactor: revert to main net

* refactor: use namespace constants

* refactor: revert to testnet and log the poll result

* fix: use or to log either poller

* fix: revert to default network and add more logging, only set the latest fork info if it is an increment

* build: update minor version

* refactor: use single target snode and namespace list for message sending

* fix: link previews and expiring messages in closed groups
2022-05-18 10:20:57 +10:00
Harris c458d4a359
Fix approved references and visible message setting flags for approval (#854)
* fix: set approved on new outgoing threads, use approved more deeply and invalidate the options menu on recipient modified. Add approvedMe flag toggles for visible message receive

* fix: add name update in action bar on modified, change where approvedMe is set

* fix: text colours and attachment approve requests

* refactor: text color for share screen

* Restart conversation loader on message request approval

Co-authored-by: ceokot <ceokot@gmail.com>
2022-03-10 09:54:18 +11:00
Harris 55aa266769
Bug fixes and provide conversation tooltips (#851)
* refactor: removing unused strings and changing session header dimensions

* refactor: remove bodyTextView from LinkPreviewView.kt and changing header image colours

* fix: path layout is aligned, global search input should always prompt soft input on open

* fix: unread count and scroll to bottom button visibility properly taking into account adapter item count and RecyclerView.NO_POSITION

fixes #848

* fix: crash on error toast for failing to share logs

* feat: conversation tooltips in NewConversationButtonSetView.kt

* fix: UI issue for conversation action bar cutting off lower than baseline characters

fixes #839

* refactor (wip): replacing bindings with nullable types to try prevent mystery bug

* refactor: use the nullable bindings for ConversationActivityV2.kt and remove inputBarHeightChanged

* fix: remove recipient listener on destroy

* build: add latest strings and increase build
2022-02-28 17:23:58 +11:00
Harris b01075cef6
fix: add UI test for URL modal dialog and fix mention infinite layout inflation bugs (#841) 2022-02-09 14:18:22 +11:00
Harris dd1da6b1a4
Add a global search (#834)
* feat: modifying search functionalities to include contacts

* feat: add global search UI input layouts and color attributes

* feat: add global search repository and model content

* feat: adding diff callbacks and wiring up global search vm to views

* feat: adding scroll to message, figuring out new query for recipient thread search

* feat: messing with the search and highlighting functionality after wiring up bindings

* fix: compile error from merge

* fix: gradlew build errors

* feat: filtering contacts by existing un-archived threads

* refactor: prevent note to self breaking, update queries and logic in search repo to include member->group reverse searches

* feat: adding home screen new redesigns for search

* feat: replacing designs and adding new group subtitle text

* feat: small design improvements and incrementing gradle build number to install on device

* feat: add scrollbars for search

* feat: replace isVisible for cancel button now that GlobalSearchInputLayout.kt replaces header

* refactor: all queries are debounced not just all but 2 char

* refactor: remove visibility modifiers for cancel icon

* refactor: use simplified non-db and context related models in display, remove db get group members call from binding data

* fix: use threadId instead of group's address

* refactor: better close on cancel, removing only yourself from group member list in open groups

* refactor: seed view back to inflated on create and visibility for empty placeholder and seed view text

* refactor: fixing build issues and new designs for message list

* refactor: use dynamic limit

* refactor: include raw session ID string search for non-empty threads

* fix: build lint errors

* fix: build issues

* feat: add in path to the settings activity

* refactor: remove wildcard imports
2022-02-07 17:06:27 +11:00
Harris 561ce83aa4
Fix quote alignment (#837)
* refactor: use constraints in quote view

* refactor: layouts for quotes fixed

* fix: use the current text, which may be the type of attachment instead of the quote body
2022-02-07 15:38:07 +11:00
Harris bd5a324ad8
Split image from replies (#779)
* refactor: VisibleMessageContentView.kt re-using layouts instead of instantiating every bind to fix alignment and constraint issues for splitting thumbnails and body

* refactor: constraint works for sms only records, adjust other components of the visible message content accordingly

* feat: link previews and quotes now wrap content or align according to media type

* refactor: move back to emojitextview for body

* fix: add some padding at the bottom of the quote

* fix: voice message view not rendering properly

* fix: set visibility to false for each message content view on recycle event

* fix: untrusted attachments

* fix: compile issues and small UI improvement
2022-01-18 14:33:04 +11: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
Harris 66e95787a2 feat: add bottom sheet modal url with copy option 2021-09-14 10:27:34 +10:00
ryanzhao 144992d817 Merge branch 'dev' of https://github.com/oxen-io/session-android into unsend-request 2021-08-16 14:38:39 +10:00
Harris 7e791d63dc fix: other view types have clickable links, clickable links in the long message. Ordering of highlight mentions before getting clickable spans
fixes #664
2021-08-12 15:36:08 +10:00
ryanzhao 8b6b02911f handle database for message deleted by unsend request 2021-08-12 11:43:33 +10:00
ryanzhao 23a61299ac bind deleted message view 2021-08-11 16:35:48 +10:00
jubb aaa20df5a5 fix: use the HttpUrl parsed URL instead because of IDN's handling of toASCII 2021-08-03 16:43:17 +10:00
jubb 71d186ad59 fix: ASCIIfy the URL open dialog's content. fixes #681 2021-08-03 14:32:34 +10:00
Niels Andriesse a554aa574e Fix adapter position vs layout position usage 2021-07-14 09:37:18 +10:00
jubb 837f133f7c fix: compilation errors 2021-07-12 10:51:01 +10:00
jubb 842cfc25a1 Merge branch 'dev' into trusted_attachment_download
# Conflicts:
#	app/src/main/java/org/thoughtcrime/securesms/conversation/v2/messages/VisibleMessageContentView.kt
#	app/src/main/java/org/thoughtcrime/securesms/conversation/v2/messages/VisibleMessageView.kt
2021-07-12 09:28:14 +10:00
jubb 9dfd051e63 feat: trust dialog and processing attachments for users after trusting them 2021-07-09 15:13:43 +10:00
Niels Andriesse c984d90b04 Re-organize files 2021-07-09 13:18:48 +10:00
Ryan Zhao a1e63c5f8e auto play next audio 2021-07-08 10:24:10 +10:00
Ryan Zhao 69b05afbd9 Merge branch 'dev' of https://github.com/oxen-io/session-android into dev 2021-07-08 09:25:48 +10:00
Ryan Zhao f5835e1b54 WIP: auto play next voice message 2021-07-08 09:25:43 +10:00
Niels Andriesse 9cd99c6c84 Fix quote view size calculation 2021-07-07 10:55:07 +10:00
jubb 21c0537432 fix: pass original missing to the quote view to prevent image with no content rendering 2021-07-05 16:52:56 +10:00
jubb d57903aa44 fix: open group poller queues trim thread job only if received messages
deleting quotes should now propagate to set quote missing flag in MMS and update the UI accordingly
2021-07-05 09:59:54 +10:00
ryanzhao 79fd74a157 Merge branch 'ui' of https://github.com/oxen-io/session-android into ui 2021-06-30 14:55:30 +10:00
Niels Andriesse dea1aeec57 Fix merge 2021-06-30 14:51:24 +10:00
Niels Andriesse e91b84f694
Merge pull request #621 from hjubb/ui
Fix Body Text URL Handling & Open Group Media Previews
2021-06-30 14:47:04 +10:00
ryanzhao 956681f00a Merge branch 'ui' of https://github.com/oxen-io/session-android into ui 2021-06-30 14:40:00 +10:00
jubb b59b8b650d fix: links work properly now and the album navigates to open group messages now 2021-06-30 14:29:32 +10:00
Niels Andriesse 907e0e4974 Remove problematic movement method 2021-06-30 13:25:58 +10:00
ryanzhao ba1099d276 Merge branch 'ui' of https://github.com/oxen-io/session-android into ui 2021-06-30 11:48:54 +10:00
Niels Andriesse bef7413055 Scroll to message upon tapping quote & fix various bugs 2021-06-30 10:30:10 +10:00
Ryan Zhao aac58ac5cf Merge branch 'ui' of https://github.com/oxen-io/session-android into ui 2021-06-29 16:17:19 +10:00
Niels Andriesse 7ce124118f Make static method call explicit 2021-06-29 16:15:47 +10:00
Ryan Zhao 19d683082e Merge branch 'ui' of https://github.com/oxen-io/session-android into ui 2021-06-29 16:15:25 +10:00
jubb 29447d6b59 fix: movement method for all body text moved into the helper function, removed caption from legacy ThumbnailView 2021-06-29 16:09:01 +10:00
jubb c5c8ebba04 fix: enable body texts to open modal URL dialog 2021-06-29 16:05:40 +10:00
Ryan Zhao 64a70d0555 Merge branch 'ui' of https://github.com/oxen-io/session-android into ui 2021-06-29 16:03:10 +10:00
Niels Andriesse 6393ed03bd Tie up some loose ends 2021-06-29 14:23:36 +10:00
Niels Andriesse dbedc5039a Implement image quoting 2021-06-29 14:05:32 +10:00
Ryan Zhao f4d3a7359e highlight the search result 2021-06-29 11:49:45 +10:00
jubb 6775e0afd7 Merge remote-tracking branch 'upstream/ui' into ui
# Conflicts:
#	app/src/main/java/org/thoughtcrime/securesms/conversation/v2/ConversationActivityV2.kt
#	app/src/main/java/org/thoughtcrime/securesms/conversation/v2/messages/VisibleMessageContentView.kt
#	app/src/main/java/org/thoughtcrime/securesms/conversation/v2/messages/VisibleMessageView.kt
2021-06-29 10:05:34 +10:00
Niels Andriesse 6d452e19ef Detect double taps 2021-06-28 15:41:23 +10:00
Niels Andriesse c17eb5e404 WIP 2021-06-28 14:51:49 +10:00
jubb 4498b6e00f Merge remote-tracking branch 'upstream/ui' into ui
# Conflicts:
#	app/src/main/java/org/thoughtcrime/securesms/conversation/v2/ConversationActivityV2.kt
#	app/src/main/java/org/thoughtcrime/securesms/conversation/v2/messages/VisibleMessageContentView.kt
#	app/src/main/java/org/thoughtcrime/securesms/conversation/v2/utilities/AttachmentManager.java
2021-06-28 11:39:11 +10:00
Ryan ZHAO 2b26876c4c fix text color for system default dark mode 2021-06-28 09:56:49 +10:00
jubb 9cccbd7aae refactor: use activity dispatcher 2021-06-25 16:30:23 +10:00