mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-20 00:29:11 +01:00
Remove old profile sharing UI.
This commit is contained in:
@@ -99,10 +99,8 @@ final class MessageRequestRepository {
|
||||
}
|
||||
|
||||
return MessageRequestState.REQUIRED;
|
||||
} else if (FeatureFlags.modernProfileSharing() && !RecipientUtil.isLegacyProfileSharingAccepted(recipient) && threadId > 0) {
|
||||
} else if (!RecipientUtil.isLegacyProfileSharingAccepted(recipient) && threadId > 0) {
|
||||
return MessageRequestState.REQUIRED;
|
||||
} else if (RecipientUtil.isPreMessageRequestThread(context, threadId) && !RecipientUtil.isLegacyProfileSharingAccepted(recipient)) {
|
||||
return MessageRequestState.PRE_MESSAGE_REQUEST;
|
||||
} else {
|
||||
return MessageRequestState.NOT_REQUIRED;
|
||||
}
|
||||
@@ -261,9 +259,6 @@ final class MessageRequestRepository {
|
||||
NOT_REQUIRED,
|
||||
|
||||
/** Explicit message request permission is required. */
|
||||
REQUIRED,
|
||||
|
||||
/** This conversation existed before message requests and needs the old UI */
|
||||
PRE_MESSAGE_REQUEST
|
||||
REQUIRED
|
||||
}
|
||||
}
|
||||
|
||||
@@ -225,9 +225,6 @@ public class MessageRequestViewModel extends ViewModel {
|
||||
case REQUIRED:
|
||||
displayState.postValue(DisplayState.DISPLAY_MESSAGE_REQUEST);
|
||||
break;
|
||||
case PRE_MESSAGE_REQUEST:
|
||||
displayState.postValue(DisplayState.DISPLAY_PRE_MESSAGE_REQUEST);
|
||||
break;
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -237,8 +234,7 @@ public class MessageRequestViewModel extends ViewModel {
|
||||
Context context = ApplicationDependencies.getApplication();
|
||||
Long threadId = DatabaseFactory.getThreadDatabase(context).getThreadIdFor(recipient.getId());
|
||||
|
||||
return FeatureFlags.modernProfileSharing() &&
|
||||
threadId != null &&
|
||||
return threadId != null &&
|
||||
(RecipientUtil.hasSentMessageInThread(context, threadId) || RecipientUtil.isPreMessageRequestThread(context, threadId));
|
||||
}
|
||||
|
||||
@@ -283,7 +279,7 @@ public class MessageRequestViewModel extends ViewModel {
|
||||
}
|
||||
|
||||
public enum DisplayState {
|
||||
DISPLAY_MESSAGE_REQUEST, DISPLAY_PRE_MESSAGE_REQUEST, DISPLAY_NONE
|
||||
DISPLAY_MESSAGE_REQUEST, DISPLAY_NONE
|
||||
}
|
||||
|
||||
public enum MessageClass {
|
||||
|
||||
Reference in New Issue
Block a user