mirror of
https://github.com/SimpleMobileTools/Simple-Dialer.git
synced 2025-06-05 21:49:23 +02:00
fix #186, properly handle clicking missed call notifications
This commit is contained in:
@@ -42,7 +42,14 @@
|
|||||||
|
|
||||||
<activity
|
<activity
|
||||||
android:name=".activities.MainActivity"
|
android:name=".activities.MainActivity"
|
||||||
android:configChanges="orientation|screenSize" />
|
android:configChanges="orientation|screenSize">
|
||||||
|
|
||||||
|
<intent-filter>
|
||||||
|
<action android:name="android.intent.action.VIEW" />
|
||||||
|
<data android:mimeType="vnd.android.cursor.dir/calls" />
|
||||||
|
<category android:name="android.intent.category.DEFAULT" />
|
||||||
|
</intent-filter>
|
||||||
|
</activity>
|
||||||
|
|
||||||
<activity
|
<activity
|
||||||
android:name="com.simplemobiletools.commons.activities.AboutActivity"
|
android:name="com.simplemobiletools.commons.activities.AboutActivity"
|
||||||
|
@@ -258,7 +258,14 @@ class MainActivity : SimpleActivity() {
|
|||||||
// selecting the proper tab sometimes glitches, add an extra selector to make sure we have it right
|
// selecting the proper tab sometimes glitches, add an extra selector to make sure we have it right
|
||||||
main_tabs_holder.onGlobalLayout {
|
main_tabs_holder.onGlobalLayout {
|
||||||
Handler().postDelayed({
|
Handler().postDelayed({
|
||||||
main_tabs_holder.getTabAt(getDefaultTab())?.select()
|
var wantedTab = getDefaultTab()
|
||||||
|
|
||||||
|
// open the Recents tab if we got here by clicking a missed call notification
|
||||||
|
if (intent.action == Intent.ACTION_VIEW) {
|
||||||
|
wantedTab = main_tabs_holder.tabCount - 1
|
||||||
|
}
|
||||||
|
|
||||||
|
main_tabs_holder.getTabAt(wantedTab)?.select()
|
||||||
invalidateOptionsMenu()
|
invalidateOptionsMenu()
|
||||||
}, 100L)
|
}, 100L)
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user