fix: send mult photos in topic group when use share

This commit is contained in:
xtaodada 2024-10-22 00:09:03 +08:00
parent 7fc6997ae4
commit 7fab9933af
Signed by: xtaodada
GPG Key ID: 4CBB3F4FA8C85659
2 changed files with 10 additions and 8 deletions

View File

@ -110,7 +110,10 @@ public class FingerprintController {
public static boolean isKeyReady() {
try {
return getKeyStore().containsAlias(KEY_ALIAS);
var ks = getKeyStore();
if (ks != null) {
return ks.containsAlias(KEY_ALIAS);
}
} catch (KeyStoreException e) {
FileLog.e(e);
}

View File

@ -6153,15 +6153,14 @@ public class LaunchActivity extends BasePermissionsActivity implements INavigati
ArrayList<String> arrayList = new ArrayList<>();
arrayList.add(videoPath);
SendMessagesHelper.prepareSendingDocuments(accountInstance, arrayList, arrayList, null, captionToSend, null, did, replyToMsg, replyToMsg, null, null, null, notify, scheduleDate, null, null, 0, 0, false);
}
}
if (photoPathsArray != null && !photosEditorOpened) {
} else if (photoPathsArray != null && photoPathsArray.size() > 0 && !photosEditorOpened) {
if (sendingText != null && sendingText.length() <= 1024 && photoPathsArray.size() == 1) {
photoPathsArray.get(0).caption = sendingText;
sendingText = null;
}
SendMessagesHelper.prepareSendingMedia(accountInstance, photoPathsArray, did, replyToMsg, replyToMsg, null, null, false, false, null, notify, scheduleDate, 0, false, null, null, 0, 0, false);
}
}
if (documentsPathsArray != null || documentsUrisArray != null) {
if (sendingText != null && sendingText.length() <= 1024 && ((documentsPathsArray != null ? documentsPathsArray.size() : 0) + (documentsUrisArray != null ? documentsUrisArray.size() : 0)) == 1) {
captionToSend = sendingText;