Skip to content

Commit

Permalink
fix: 正しくノートがアカウントに応じて再読み込みされるようにした
Browse files Browse the repository at this point in the history
  • Loading branch information
pantasystem committed Jul 15, 2023
1 parent 99d7d73 commit 6a6e7b8
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,10 @@ class NoteDetailPagerViewModel @Inject constructor(


@OptIn(ExperimentalCoroutinesApi::class)
private val timelineState = currentAccount.flatMapLatest {
private val timelineState = savedStateHandle.getStateFlow<Pageable?>(EXTRA_FROM_PAGEABLE, null).flatMapLatest {
if (it != null) {
timelineStoreHolder.setPageable(it)
}
timelineStoreHolder.timelineStore.timelineState
}.stateIn(
viewModelScope,
Expand Down

0 comments on commit 6a6e7b8

Please sign in to comment.