Fix issue where group updates were mis-rendered.

master
Greyson Parrelli 2020-07-30 23:05:09 -04:00
parent 4942d83de5
commit 3e166ef927
3 changed files with 8 additions and 2 deletions

View File

@ -128,7 +128,9 @@ public final class MessageGroupContext {
public @NonNull List<RecipientId> getMembersListExcludingSelf() {
RecipientId selfId = Recipient.self().getId();
return Stream.of(groupContext.getMembersE164List())
return Stream.of(groupContext.getMembersList())
.map(GroupContext.Member::getE164)
.withoutNulls()
.map(e164 -> new SignalServiceAddress(null, e164))
.map(RecipientId::from)
.filterNot(selfId::equals)

View File

@ -133,7 +133,7 @@ public final class GroupUtil {
members.size(), toString(members)));
}
if (title != null && !title.trim().isEmpty()) {
if (!title.trim().isEmpty()) {
if (members != null) description.append(" ");
else description.append("\n");
description.append(context.getString(R.string.GroupUtil_group_name_is_now, title));

View File

@ -137,6 +137,10 @@ public final class StringUtil {
* https://www.w3.org/International/questions/qa-bidi-unicode-controls
*/
public static @NonNull String isolateBidi(@NonNull String text) {
if (text.isEmpty()) {
return text;
}
int overrideCount = 0;
int overrideCloseCount = 0;
int isolateCount = 0;