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
|
||||
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
|
||||
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
|
||||
main_tabs_holder.onGlobalLayout {
|
||||
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()
|
||||
}, 100L)
|
||||
}
|
||||
|
Reference in New Issue
Block a user