Java Code Examples for androidx.lifecycle.Transformations#distinctUntilChanged()

The following examples show how to use androidx.lifecycle.Transformations#distinctUntilChanged() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ConversationGroupViewModel.java    From mollyim-android with GNU General Public License v3.0 4 votes vote down vote up
private ConversationGroupViewModel() {
  liveRecipient                     = new MutableLiveData<>();
  LiveData<GroupRecord> groupRecord = LiveDataUtil.mapAsync(liveRecipient, this::getGroupRecordForRecipient);
  groupActiveState                  = Transformations.distinctUntilChanged(Transformations.map(groupRecord, this::mapToGroupActiveState));
}
 
Example 2
Source File: EditProfileViewModel.java    From mollyim-android with GNU General Public License v3.0 4 votes vote down vote up
public LiveData<String> givenName() {
  return Transformations.distinctUntilChanged(givenName);
}
 
Example 3
Source File: EditProfileViewModel.java    From mollyim-android with GNU General Public License v3.0 4 votes vote down vote up
public LiveData<String> familyName() {
  return Transformations.distinctUntilChanged(familyName);
}
 
Example 4
Source File: EditProfileViewModel.java    From mollyim-android with GNU General Public License v3.0 4 votes vote down vote up
public LiveData<ProfileName> profileName() {
  return Transformations.distinctUntilChanged(internalProfileName);
}
 
Example 5
Source File: EditProfileViewModel.java    From mollyim-android with GNU General Public License v3.0 4 votes vote down vote up
public LiveData<Boolean> isFormValid() {
  return Transformations.distinctUntilChanged(isFormValid);
}
 
Example 6
Source File: EditProfileViewModel.java    From mollyim-android with GNU General Public License v3.0 4 votes vote down vote up
public LiveData<byte[]> avatar() {
  return Transformations.distinctUntilChanged(internalAvatar);
}
 
Example 7
Source File: ConfirmKbsPinViewModel.java    From mollyim-android with GNU General Public License v3.0 4 votes vote down vote up
LiveData<SaveAnimation> getSaveAnimation() {
  return Transformations.distinctUntilChanged(saveAnimation);
}
 
Example 8
Source File: ConfirmKbsPinViewModel.java    From mollyim-android with GNU General Public License v3.0 4 votes vote down vote up
LiveData<Label> getLabel() {
  return Transformations.distinctUntilChanged(label);
}
 
Example 9
Source File: WebRtcCallViewModel.java    From mollyim-android with GNU General Public License v3.0 4 votes vote down vote up
public LiveData<Boolean> getRemoteVideoEnabled() {
  return Transformations.distinctUntilChanged(remoteVideoEnabled);
}
 
Example 10
Source File: WebRtcCallViewModel.java    From mollyim-android with GNU General Public License v3.0 4 votes vote down vote up
public LiveData<Boolean> getMicrophoneEnabled() {
  return Transformations.distinctUntilChanged(microphoneEnabled);
}
 
Example 11
Source File: WebRtcCallViewModel.java    From mollyim-android with GNU General Public License v3.0 4 votes vote down vote up
public LiveData<CameraState.Direction> getCameraDirection() {
  return Transformations.distinctUntilChanged(cameraDirection);
}
 
Example 12
Source File: MainRepository.java    From lttrs-android with Apache License 2.0 4 votes vote down vote up
public LiveData<Boolean> hasAccounts() {
    return Transformations.distinctUntilChanged(appDatabase.accountDao().hasAccountsLiveData());
}
 
Example 13
Source File: SetupViewModel.java    From lttrs-android with Apache License 2.0 4 votes vote down vote up
public LiveData<String> getEmailAddressError() {
    return Transformations.distinctUntilChanged(emailAddressError);
}
 
Example 14
Source File: SetupViewModel.java    From lttrs-android with Apache License 2.0 4 votes vote down vote up
public LiveData<String> getPasswordError() {
    return Transformations.distinctUntilChanged(this.passwordError);
}
 
Example 15
Source File: SetupViewModel.java    From lttrs-android with Apache License 2.0 4 votes vote down vote up
public LiveData<String> getSessionResourceError() {
    return Transformations.distinctUntilChanged(sessionResourceError);
}