mirror of
https://github.com/ArcaneChat/android.git
synced 2026-07-03 14:05:24 +02:00
Copy user names to clipboard, fixes issue #6.
This commit is contained in:
@@ -543,11 +543,10 @@ public class MessagesController implements NotificationCenter.NotificationCenter
|
||||
}
|
||||
|
||||
public TLRPC.User getUser(Integer id) {
|
||||
// EDIT BY MR
|
||||
// EDIT BY MR - additional information should be loaded as needed by the caller
|
||||
TLRPC.User u = new TLRPC.User();
|
||||
u.id = id;
|
||||
return u;
|
||||
//return users.get(id); -- /EDIT BY MR
|
||||
}
|
||||
|
||||
public TLRPC.User getUser(String username) {
|
||||
|
||||
@@ -6966,17 +6966,9 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
|
||||
String str = "";
|
||||
if (name) {
|
||||
if (previousUid != messageObject.messageOwner.from_id) {
|
||||
if (messageObject.messageOwner.from_id > 0) {
|
||||
TLRPC.User user = MessagesController.getInstance().getUser(messageObject.messageOwner.from_id);
|
||||
if (user != null) {
|
||||
str = ContactsController.formatName(user.first_name, user.last_name) + ":\n";
|
||||
}
|
||||
} else if (messageObject.messageOwner.from_id < 0) {
|
||||
TLRPC.Chat chat = MessagesController.getInstance().getChat(-messageObject.messageOwner.from_id);
|
||||
if (chat != null) {
|
||||
str = chat.title + ":\n";
|
||||
}
|
||||
}
|
||||
long hContact = MrMailbox.MrMailboxGetContactById(MrMailbox.hMailbox, messageObject.messageOwner.from_id);
|
||||
str += MrMailbox.MrContactGetDisplayName(hContact) + ":\n";
|
||||
MrMailbox.MrContactUnref(hContact);
|
||||
}
|
||||
}
|
||||
if (messageObject.type == 0 && messageObject.messageOwner.message != null) {
|
||||
|
||||
Reference in New Issue
Block a user