Skip to content

Commit 97d8d5a

Browse files
AkashDhimangnprice
authored andcommitted
sharing: Fix bug when app is launched from history.
This was required because of the following bug: 1. share from any app to zulip. 2. cancel the share. 3. return back to zulip by selecting it from minimized apps. 4. now go back to the previous app used to share to zulip. 5. share something to zulip again. 6. the sharing screen will not be visible. Intended behavior: Sharing screen should be visible in step 6 This bug was possibly introduced in: 70e9ad9 The condition checking `FLAG_ACTIVITY_LAUNCHED_FROM_HISTORY` in the code that commit introduces, checks MainActivity's intent (intent the app was originally started with). Instead it should check the intent handleSend was called with. This caused the intents coming via `onNewIntent` to be ignored.
1 parent ba96551 commit 97d8d5a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

android/app/src/main/java/com/zulipmobile/MainActivity.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ open class MainActivity : ReactActivity() {
6464

6565
private fun handleSend(intent: Intent) {
6666
// Intent is reused after quitting, skip it.
67-
if ((getIntent().flags and Intent.FLAG_ACTIVITY_LAUNCHED_FROM_HISTORY) != 0) {
67+
if ((intent.flags and Intent.FLAG_ACTIVITY_LAUNCHED_FROM_HISTORY) != 0) {
6868
return;
6969
}
7070

0 commit comments

Comments
 (0)