AccountMediaFragment improvements (#2684)
* initial setup * add spacing between images * use blurhash * handle hidden state and show video indicator * handle item clicks * small cleanup * move SquareImageView into account.media package * fix build * improve AccountMediaGridAdapter * handle loadstate, errors and refreshing * remove commented out code * log error * show audio attachments with icon * fix glitchy transition animation * set image Description on imageview * show toast with media description on long press
This commit is contained in:
parent
257f3a5c1c
commit
c8fc2418b8
15 changed files with 530 additions and 284 deletions
|
|
@ -5,6 +5,7 @@ package com.keylesspalace.tusky.di
|
|||
import androidx.lifecycle.ViewModel
|
||||
import androidx.lifecycle.ViewModelProvider
|
||||
import com.keylesspalace.tusky.components.account.AccountViewModel
|
||||
import com.keylesspalace.tusky.components.account.media.AccountMediaViewModel
|
||||
import com.keylesspalace.tusky.components.announcements.AnnouncementsViewModel
|
||||
import com.keylesspalace.tusky.components.compose.ComposeViewModel
|
||||
import com.keylesspalace.tusky.components.conversation.ConversationsViewModel
|
||||
|
|
@ -113,5 +114,10 @@ abstract class ViewModelModule {
|
|||
@IntoMap
|
||||
@ViewModelKey(ViewThreadViewModel::class)
|
||||
internal abstract fun viewThreadViewModel(viewModel: ViewThreadViewModel): ViewModel
|
||||
|
||||
@Binds
|
||||
@IntoMap
|
||||
@ViewModelKey(AccountMediaViewModel::class)
|
||||
internal abstract fun accountMediaViewModel(viewModel: AccountMediaViewModel): ViewModel
|
||||
// Add more ViewModels here
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue