kopia lustrzana https://github.com/ryukoposting/Signal-Android
Only update tab if it has actually changed.
rodzic
ba4c0386ef
commit
e3fb8a2137
|
@ -70,7 +70,7 @@ public class MainActivity extends PassphraseRequiredActivity implements VoiceNot
|
||||||
CachedInflater.from(this).clear();
|
CachedInflater.from(this).clear();
|
||||||
|
|
||||||
conversationListTabsViewModel = new ViewModelProvider(this, factory).get(ConversationListTabsViewModel.class);
|
conversationListTabsViewModel = new ViewModelProvider(this, factory).get(ConversationListTabsViewModel.class);
|
||||||
Transformations.map(conversationListTabsViewModel.getState(), ConversationListTabsState::getTab)
|
Transformations.distinctUntilChanged(Transformations.map(conversationListTabsViewModel.getState(), ConversationListTabsState::getTab))
|
||||||
.observe(this, tab -> {
|
.observe(this, tab -> {
|
||||||
switch (tab) {
|
switch (tab) {
|
||||||
case CHATS:
|
case CHATS:
|
||||||
|
|
Ładowanie…
Reference in New Issue