Skip to content
This repository has been archived by the owner on Sep 23, 2024. It is now read-only.

Blocks and mutes list part 2 - Created and populated blocks list screen with api result #285

Merged
merged 3 commits into from
Nov 16, 2023

Conversation

devotaaabel
Copy link
Contributor

@devotaaabel devotaaabel commented Nov 16, 2023

I've been reading the API guidelines for compose, and I've tried to implement a few suggestions in this PR:

  • Created separate named styled text composables (see SmallTextLabel, LargeTextTitle, etc.) instead of manually always needing to pass in style to emulate "building blocks" described in docs
  • Started updating parameter order
  • Added modifier to all components (as the first optional param always)
  • Tried to give each component only one problem to solve
  • Updated QuickAccountView with a button slot (and other guidelines)

…locks api to blocks list. Updated QuickAccountView with a button slot and to conform to guidelines
@devotaaabel devotaaabel requested review from a team, JohnOberhauser and timc-mozilla and removed request for a team November 16, 2023 05:36

// TODO@DA error handling and unblock
fun onBlockButtonClicked(accountId: String) {
viewModelScope.launch(ioDispatcher) { accountRepository.muteAccount(accountId) }
Copy link
Member

@JohnOberhauser JohnOberhauser Nov 16, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should use the BlockAccount use case to ensure the database is updated properly

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah TY

fun onMuteButtonClicked(
accountId: String,
) {
viewModelScope.launch(ioDispatcher) { accountRepository.muteAccount(accountId) }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here, but with MuteAccount

@devotaaabel devotaaabel merged commit 20057d2 into main Nov 16, 2023
3 checks passed
@devotaaabel devotaaabel deleted the blocked-users-screen branch November 16, 2023 18:23
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants