When using the up arrow, navigate back to the main messages screen
- Ensures only 1 main activity can be launched
This commit is contained in:
parent
449f1bf4c2
commit
3375ecdb12
|
@ -2,7 +2,7 @@
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
|
||||||
<application>
|
<application>
|
||||||
<activity android:name="app.dapk.st.home.MainActivity"/>
|
<activity android:name="app.dapk.st.home.MainActivity" android:launchMode="singleInstance"/>
|
||||||
</application>
|
</application>
|
||||||
|
|
||||||
</manifest>
|
</manifest>
|
|
@ -6,6 +6,7 @@ import android.content.Context
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
import android.os.Parcel
|
import android.os.Parcel
|
||||||
import android.os.Parcelable
|
import android.os.Parcelable
|
||||||
|
import androidx.core.app.NavUtils
|
||||||
import app.dapk.st.core.AndroidUri
|
import app.dapk.st.core.AndroidUri
|
||||||
import app.dapk.st.core.MimeType
|
import app.dapk.st.core.MimeType
|
||||||
import app.dapk.st.matrix.common.RoomId
|
import app.dapk.st.matrix.common.RoomId
|
||||||
|
@ -33,7 +34,8 @@ interface Navigator {
|
||||||
}
|
}
|
||||||
|
|
||||||
fun upToHome() {
|
fun upToHome() {
|
||||||
activity.navigateUpTo(intentFactory.home(activity))
|
activity.finish()
|
||||||
|
activity.startActivity(intentFactory.home(activity))
|
||||||
}
|
}
|
||||||
|
|
||||||
fun toMessenger(roomId: RoomId, attachments: List<MessageAttachment>) {
|
fun toMessenger(roomId: RoomId, attachments: List<MessageAttachment>) {
|
||||||
|
|
Loading…
Reference in New Issue