mirror of
https://github.com/ArcaneChat/android.git
synced 2026-07-03 14:05:24 +02:00
Merge pull request #2694 from deltachat/adb/refresh-chatlist
fix account switching issues
This commit is contained in:
@@ -121,7 +121,7 @@ public class Recipient {
|
||||
int chatId = dcChat.getId();
|
||||
this.address = Address.fromChat(chatId);
|
||||
if (!dcChat.isMultiUser()) {
|
||||
DcContext dcContext = DcHelper.getContext(context);
|
||||
DcContext dcContext = DcHelper.getAccounts(context).getAccount(dcChat.getAccountId());
|
||||
int[] contacts = dcContext.getChatContacts(chatId);
|
||||
if( contacts.length>=1 ) {
|
||||
this.dcContact = dcContext.getContact(contacts[0]);
|
||||
@@ -171,7 +171,7 @@ public class Recipient {
|
||||
public @NonNull List<Recipient> loadParticipants(Context context) {
|
||||
List<Recipient> participants = new ArrayList<>();
|
||||
if (dcChat!=null) {
|
||||
DcContext dcContext = DcHelper.getContext(context);
|
||||
DcContext dcContext = DcHelper.getAccounts(context).getAccount(dcChat.getAccountId());
|
||||
int[] contactIds = dcContext.getChatContacts(dcChat.getId());
|
||||
for (int contactId : contactIds) {
|
||||
participants.add(new Recipient(context, dcContext.getContact(contactId)));
|
||||
|
||||
Reference in New Issue
Block a user