File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
app/src/main/kotlin/com/simplemobiletools/notes/pro/activities Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -98,18 +98,22 @@ class MainActivity : SimpleActivity() {
98
98
searchNextBtn = findViewById(com.simplemobiletools.commons.R .id.search_next)
99
99
searchClearBtn = findViewById(com.simplemobiletools.commons.R .id.search_clear)
100
100
101
- initViewPager(intent.getLongExtra(OPEN_NOTE_ID , - 1L ))
101
+ val noteToOpen = intent.getLongExtra(OPEN_NOTE_ID , - 1L )
102
+ initViewPager(noteToOpen)
102
103
binding.pagerTabStrip.drawFullUnderline = false
103
104
val textSize = getPercentageFontSize()
104
105
binding.pagerTabStrip.setTextSize(TypedValue .COMPLEX_UNIT_PX , textSize)
105
106
binding.pagerTabStrip.layoutParams.height =
106
107
(textSize + resources.getDimension(com.simplemobiletools.commons.R .dimen.medium_margin) * 2 ).toInt()
107
108
(binding.pagerTabStrip.layoutParams as ViewPager .LayoutParams ).isDecor = true
109
+
110
+ val hasNoIntent = intent.action.isNullOrEmpty() && noteToOpen == - 1L
111
+
108
112
checkWhatsNewDialog()
109
113
checkIntents(intent)
110
114
111
115
storeStateVariables()
112
- if (config.showNotePicker && savedInstanceState == null ) {
116
+ if (config.showNotePicker && savedInstanceState == null && hasNoIntent ) {
113
117
displayOpenNoteDialog()
114
118
}
115
119
You can’t perform that action at this time.
0 commit comments