Skip to content

Instantly share code, notes, and snippets.

@iNPUTmice

iNPUTmice/c3.md Secret

Last active Sep 26, 2022
Embed
What would you like to do?
  • Create new database schema. The new database schema should support
    • messages with multiple versions that are created through editing or moderation
    • messages that can have several attributes on it like reactions
    • messages that can contain multiple 'media' (for example text + images or multiple images))
    • messages that reference (quote) another message
    • Conversations (Chats) with more types than the existing 'group chat' and 'individual' such as 'multicast' which are a static list of participants. (Helpful for SMS<->XMPP gateways among other things)
  • Create Entities and Data Access Objects for everything that’s stored and retrieved from the database. Even for database tables that are fine in Conversations 2.x new entities and DAOs need to be created if we want to access them through Android Room.
  • Use Jetpack security library to store password and login tokens in an encrypted JSON file
  • Use Android Room to read and write all data
    • Remove in-memory representation of conversations and messages; reduce memory consumption; apply message de-duplication and editing directly against database and not the 50 most recent messages that are held in memory.
    • Rework all ListAdapters to RecyclerView.Adapters in order to work with paged data and add paging functionality through Android Paging library
  • Introduce Navigation Component. This brings structure to the app and follows latest 'single activity' guidelines for Android development.
    • Everything that is currently an activity needs to be refactored to be a Fragment instead.
  • Use Two-way data binding everywhere. Currently one-way data binding is used for some screens. Conversations should use two way data binding (displaying data and reacting to user input) everywhere.
    • Introduce AndroidViewModels in all Fragments to reference the bound data.
  • Use internal storage for all attachments. Currently all attachments are stored on the (virtual) SD card visible for all other apps. This is now (rightfully) discouraged by Android. We instead want to store data internal and offer a 'save' button to export individual attachments on a case-by-case basis. However this means that Conversations needs a gallery built in so users can scroll through images.
    • Add ability to page through all images in a chat
  • Use Material 3 themes
  • Add message reactions (see database changes above); including jump to original message
  • Add messages references (quotes; see database changes above)
  • Show edit history
  • Include ability to view message search result in context (jump to search result)
  • Use WorkManager to keep track of tasks (add roster item, add bookmark, send read receipt, …)
    • Introduce Future<> api for IQ sending and message sending (via smacks)
    • Introduce Future<> api for connection status
    • Tasks can implement ListenableWorker and wait for connection and then wait for IQ/message future.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment