Delivery status ➔ Typing ➔ Online status ➔ Pagination ➔ Offline send ➔ Delete chat ➔ Blacklist user ➔ Different types of chats ➔ Search ➔ Chat with Lalafo Features
Delivery status ➔ Typing ➔ Online status ➔ Pagination ➔ Offline send ➔ Delete chat ➔ Blacklist user ➔ Different types of chats ➔ Search ➔ Chat with Lalafo ➔ Automate response ➔ ... Features
leaves the app ➔ Don’t use foreground Service to keep connection open ➔ Use Firebase Cloud Messaging to notify the app about new messages ➔ Use WorkManager to prefetch the messages after FCM notification
LoadNextPageAction : Action() data class ErrorLoadingPageAction(val error: Throwable, val page: Int) : Action() data class PageLoadedAction(val itemsLoaded: List<GithubRepository>, val page: Int) : Action() data class StartLoadingNextPage(val page: Int) : Action() } StateMachine Actions
data class ErrorLoadingFirstPageState(val errorMessage: String) : State() data class ShowContentState(val items: List<GithubRepository>, val page: Int) : State() }
and the current state to calculate the new state. */ private fun reducer(state: State, action: Action): State { return when (action) { is StartLoadingNextPage -> State.LoadingFirstPageState is PageLoadedAction -> State.ShowContentState(items = action.items, page = action.page) is ErrorLoadingPageAction -> State.ErrorLoadingFirstPageState(action.error.localizedMessage) } }