Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release/1.20.1 #1682

Merged
merged 23 commits into from
Oct 7, 2024
Merged
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
af89d5f
Merge pull request #1662 from oxen-io/release/1.20.0
ThomasSession Sep 11, 2024
59eed88
Updating the app to using Compose 1.7.1 via the latest BOM
ThomasSession Sep 11, 2024
d897a83
Tweaking debug menu
ThomasSession Sep 11, 2024
607dae2
Removing hardcoded reference to material3
ThomasSession Sep 11, 2024
f0c8ec8
Using the latest compose compiler
ThomasSession Sep 11, 2024
fdf8f41
Merge pull request #1663 from oxen-io/feature/compose-1.7.1
ThomasSession Sep 11, 2024
73b0088
Fix ItemButton padding for downstate
Sep 18, 2024
6ca34b2
Merge pull request #1670 from oxen-io/release/1.20.0
ThomasSession Sep 19, 2024
89a854e
Merge pull request #1672 from bemusementpark/ItemButton
ThomasSession Sep 19, 2024
1ff8ea0
SES-1714 - SES-1715
ThomasSession Sep 19, 2024
3dfbd08
Cleaned up ItemButton to work in both its variations
ThomasSession Sep 20, 2024
75c5a75
Merge pull request #1675 from oxen-io/fix/message-request-after-delete
ThomasSession Sep 20, 2024
b74d35e
Merge pull request #1679 from oxen-io/release/1.20.0
ThomasSession Sep 24, 2024
c956b20
Making sure we don't pass in a null recipient name
ThomasSession Sep 30, 2024
29c6e6b
Adding back long press fix
ThomasSession Oct 1, 2024
3d42a04
Fixing property name
ThomasSession Oct 2, 2024
b237faa
Fixing ANRs
ThomasSession Oct 4, 2024
8fec296
Fixing Crashes
ThomasSession Oct 4, 2024
390757f
Updating QA tags for dialogs as per the QA Team's instructions
ThomasSession Oct 4, 2024
d257a1a
Moving recovery password dialogs to compose for QA
ThomasSession Oct 4, 2024
a3abf94
Latest translations
ThomasSession Oct 4, 2024
c095427
Build process update
ThomasSession Oct 7, 2024
b595475
Using appropriate name
ThomasSession Oct 7, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fixing Crashes
  • Loading branch information
ThomasSession committed Oct 4, 2024
commit 8fec296c11c317dfff06e243404aa0a8de846f4b
Original file line number Diff line number Diff line change
@@ -735,9 +735,10 @@ class ConversationActivityV2 : PassphraseRequiredActionBarActivity(), InputBarDe
private fun restoreDraftIfNeeded() {
val mediaURI = intent.data
val mediaType = AttachmentManager.MediaType.from(intent.type)
val mimeType = MediaUtil.getMimeType(this, mediaURI)
if (mediaURI != null && mediaType != null) {
if (AttachmentManager.MediaType.IMAGE == mediaType || AttachmentManager.MediaType.GIF == mediaType || AttachmentManager.MediaType.VIDEO == mediaType) {
val media = Media(mediaURI, MediaUtil.getMimeType(this, mediaURI)!!, 0, 0, 0, 0, Optional.absent(), Optional.absent())
if (mimeType != null && (AttachmentManager.MediaType.IMAGE == mediaType || AttachmentManager.MediaType.GIF == mediaType || AttachmentManager.MediaType.VIDEO == mediaType)) {
val media = Media(mediaURI, mimeType, 0, 0, 0, 0, Optional.absent(), Optional.absent())
startActivityForResult(MediaSendActivity.buildEditorIntent(this, listOf( media ), viewModel.recipient!!, ""), PICK_FROM_LIBRARY)
return
} else {
Original file line number Diff line number Diff line change
@@ -144,14 +144,17 @@ public CharSequence getDisplayBody(@NonNull Context context) {
.format().toString();

} else if (MmsSmsColumns.Types.isMessageRequestResponse(type)) {
if (lastMessage.getRecipient().getAddress().serialize().equals(
TextSecurePreferences.getLocalNumber(context))) {
return UtilKt.getSubbedCharSequence(
context,
R.string.messageRequestYouHaveAccepted,
new Pair<>(NAME_KEY, getName())
);
try {
if (lastMessage.getRecipient().getAddress().serialize().equals(
TextSecurePreferences.getLocalNumber(context))) {
return UtilKt.getSubbedCharSequence(
context,
R.string.messageRequestYouHaveAccepted,
new Pair<>(NAME_KEY, getName())
);
}
}
catch (Exception e){} // the above can throw a null exception
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we address the NPE rather than catching it? Like getName() != null as part of the condition

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@SessionHero01 Ideally yes but I couldn't be sure which part was returning null here.
Are we sure it is getName()?
The store seem to think it was here:

lastMessage.getRecipient().getAddress().serialize().equals(
                        TextSecurePreferences.getLocalNumber(context)))

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right there's no clear indication which one is null


return context.getString(R.string.messageRequestsAccepted);
} else if (getCount() == 0) {