Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Communication: Save failed-to-send message #84

Merged
merged 41 commits into from
Mar 16, 2024

Conversation

nityanandaz
Copy link
Collaborator

@nityanandaz nityanandaz commented Mar 3, 2024

Warning

Database is in-memory only

Part #48

Android

initial sending failure retry complete
Bildschirmfoto am 2024-03-02 um 16 00 26 Bildschirmfoto am 2024-03-02 um 16 00 40 Bildschirmfoto am 2024-03-02 um 16 00 54 Bildschirmfoto am 2024-03-02 um 16 01 04 Bildschirmfoto am 2024-03-02 um 16 01 16

@nityanandaz nityanandaz self-assigned this Mar 3, 2024
@nityanandaz
Copy link
Collaborator Author

nityanandaz commented Mar 8, 2024

Context

Problem

Networks are sometimes constrained or expensive.

Motivation

Users want to go on messaging.

Requirements Engineering

Existing (Problematic) Solution / System

The app starts loading, if the user tapped the send button.
As long as the app is loading, the user cannot compose subsequent messages.

Proposed System

The send-message request starts loading, if the user tapped the send button.
The request is queued in the conversation view.

Success

The message is inserted into the appropriate section.

Failure

The message remains in the queue.
The user can retry sending the message.

The queue is persisted across app launches/life cycles.

(The user can remove the message.)

Requirements

Functional Requirements

  1. Queue message
  2. Insert message into section
  3. Retry sending a message

Non-functional Requirements

  1. .

Analysis

Analysis Object Model

  • Message
  • Conversation
  • Send Command/Action/Task

Dynamic Behavior

.

@nityanandaz
Copy link
Collaborator Author

Simulator.Screen.Recording.-.iPhone.15.Pro.Max.-.2024-03-09.at.19.09.19.mp4

@nityanandaz nityanandaz marked this pull request as ready for review March 10, 2024 13:30
Thread 14: "-[UIKeyboardTaskQueue waitUntilAllTasksAreFinished] may only be called from the main thread."
@nityanandaz
Copy link
Collaborator Author

Simulator.Screen.Recording.-.iPhone.15.Pro.Max.-.2024-03-10.at.22.28.42.mp4
Simulator.Screen.Recording.-.iPhone.15.Pro.Max.-.2024-03-10.at.22.30.16.mp4

@nityanandaz
Copy link
Collaborator Author

Revision

Retry manually only after sending failed.

  1. SendMessageView send
    1. On success end
    2. On failure ConversationOfflineSection

@nityanandaz nityanandaz merged commit cee6d4e into develop Mar 16, 2024
1 check passed
@nityanandaz nityanandaz deleted the feature/communication/retry-offline-message branch March 16, 2024 15:21
@nityanandaz nityanandaz mentioned this pull request Mar 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant