mirror of
https://github.com/ArcaneChat/android.git
synced 2026-07-03 14:05:24 +02:00
fix showing selected chats
this bug was introduced some days ago at adce890bef
by declaring chatId as "int" instead of "long", which is formally correct,
however, int many parts of the code, the chatId is "long" -
as for the set of selected chats:
checking that set for an "int" always returns false ...
i first wanted to change all the sets to use int instead of long,
however, this would require lots of lines to be change -
keeping in mind that this seems to be very sensitive,
and use "long" for the chatId in ConversationListItem.
doing a larger refactoring of Long to Int has the potential to introduce more bugs,
things are not that intuitive in this area -
i would also not have exected that i cannot query a set of longs using an integer,
when using primitives (i know, they are converted implicitly to objects :)
This commit is contained in:
@@ -70,7 +70,7 @@ public class ConversationListItem extends RelativeLayout
|
||||
|
||||
private DcLot dcSummary;
|
||||
private Set<Long> selectedThreads;
|
||||
private int chatId;
|
||||
private long chatId;
|
||||
private int msgId;
|
||||
private GlideRequests glideRequests;
|
||||
private TextView subjectView;
|
||||
@@ -130,7 +130,7 @@ public class ConversationListItem extends RelativeLayout
|
||||
this.dcSummary = dcSummary;
|
||||
this.selectedThreads = selectedThreads;
|
||||
Recipient recipient = thread.getRecipient();
|
||||
this.chatId = (int) thread.getThreadId();
|
||||
this.chatId = thread.getThreadId();
|
||||
this.msgId = msgId;
|
||||
this.glideRequests = glideRequests;
|
||||
this.unreadCount = thread.getUnreadCount();
|
||||
|
||||
Reference in New Issue
Block a user