Add rendering and handling for various disabled input states in CFv2.

This commit is contained in:
Cody Henthorne
2023-05-22 20:33:31 -04:00
committed by Nicholas
parent ad50c81a6b
commit 1099128513
17 changed files with 668 additions and 245 deletions

View File

@@ -88,7 +88,7 @@ public final class LiveRecipient {
* @return An rx-flavored {@link Observable}.
*/
public @NonNull Observable<Recipient> observable() {
return subject.distinctUntilChanged(Recipient::hasSameContent);
return subject;
}
/**

View File

@@ -155,17 +155,7 @@ public class Recipient {
@AnyThread
public static @NonNull Observable<Recipient> observable(@NonNull RecipientId id) {
Preconditions.checkNotNull(id, "ID cannot be null");
return Observable.<Recipient>create(emitter -> {
LiveRecipient live = live(id);
emitter.onNext(live.resolve());
RecipientForeverObserver observer = emitter::onNext;
live.observeForever(observer);
emitter.setCancellable(() -> {
live.removeForeverObserver(observer);
});
}).subscribeOn(Schedulers.io());
return live(id).observable().subscribeOn(Schedulers.io());
}
/**
@@ -1355,6 +1345,7 @@ public class Recipient {
Objects.equals(extras, other.extras) &&
hasGroupsInCommon == other.hasGroupsInCommon &&
Objects.equals(badges, other.badges) &&
isActiveGroup == other.isActiveGroup &&
Objects.equals(callLinkRoomId, other.callLinkRoomId);
}