fix: sender peer order

This commit is contained in:
xtaodada 2023-02-04 13:56:25 +08:00
parent 4fb3038b41
commit af881750ab
Signed by: xtaodada
GPG Key ID: 4CBB3F4FA8C85659

View File

@ -147,7 +147,7 @@ public class SenderSelectPopup extends ActionBarPopupWindow {
var chat = messagesController.getChat(chatFull.id);
if (chat != null && chat.creator) {
if (peers.stream().noneMatch(peer -> peer.peer.channel_id == chat.id)) {
peers.add(0, new TLRPC.TL_sendAsPeer() {{
peers.add(peers.size() >= 1 ? 1 : 0, new TLRPC.TL_sendAsPeer() {{
peer = new TLRPC.TL_peerChannel() {{ channel_id = chat.id; }};
}});
}