mirror of
https://github.com/oxen-io/session-android.git
synced 2024-11-27 20:15:21 +00:00
Fix various crashes
This commit is contained in:
parent
176456c253
commit
004ea5b87a
@ -1260,7 +1260,7 @@ class ConversationActivityV2 : PassphraseRequiredActionBarActivity(), InputBarDe
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun saveDraft() {
|
private fun saveDraft() {
|
||||||
val text = inputBar.text.trim()
|
val text = inputBar?.text?.trim() ?: return
|
||||||
if (text.isEmpty()) { return }
|
if (text.isEmpty()) { return }
|
||||||
val drafts = Drafts()
|
val drafts = Drafts()
|
||||||
drafts.add(DraftDatabase.Draft(DraftDatabase.Draft.TEXT, text))
|
drafts.add(DraftDatabase.Draft(DraftDatabase.Draft.TEXT, text))
|
||||||
|
@ -82,7 +82,7 @@ class VisibleMessageView : LinearLayout {
|
|||||||
val senderSessionID = sender.address.serialize()
|
val senderSessionID = sender.address.serialize()
|
||||||
val threadID = message.threadId
|
val threadID = message.threadId
|
||||||
val threadDB = DatabaseFactory.getThreadDatabase(context)
|
val threadDB = DatabaseFactory.getThreadDatabase(context)
|
||||||
val thread = threadDB.getRecipientForThreadId(threadID)!!
|
val thread = threadDB.getRecipientForThreadId(threadID) ?: return
|
||||||
val contactDB = DatabaseFactory.getSessionContactDatabase(context)
|
val contactDB = DatabaseFactory.getSessionContactDatabase(context)
|
||||||
val isGroupThread = thread.isGroupRecipient
|
val isGroupThread = thread.isGroupRecipient
|
||||||
val isStartOfMessageCluster = isStartOfMessageCluster(message, previous, isGroupThread)
|
val isStartOfMessageCluster = isStartOfMessageCluster(message, previous, isGroupThread)
|
||||||
|
@ -883,6 +883,7 @@ public class MmsDatabase extends MessagingDatabase {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void deleteQuotedFromMessages(MessageRecord toDeleteRecord) {
|
public void deleteQuotedFromMessages(MessageRecord toDeleteRecord) {
|
||||||
|
if (toDeleteRecord == null) { return; }
|
||||||
String query = THREAD_ID + " = ?";
|
String query = THREAD_ID + " = ?";
|
||||||
Cursor threadMmsCursor = rawQuery(query, new String[]{String.valueOf(toDeleteRecord.getThreadId())});
|
Cursor threadMmsCursor = rawQuery(query, new String[]{String.valueOf(toDeleteRecord.getThreadId())});
|
||||||
Reader reader = readerFor(threadMmsCursor);
|
Reader reader = readerFor(threadMmsCursor);
|
||||||
|
@ -191,6 +191,7 @@ class EnterPublicKeyFragment : Fragment() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun handleIsKeyboardShowingChanged() {
|
private fun handleIsKeyboardShowingChanged() {
|
||||||
|
val optionalContentContainer = optionalContentContainer ?: return
|
||||||
optionalContentContainer.isVisible = !isKeyboardShowing
|
optionalContentContainer.isVisible = !isKeyboardShowing
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user