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() {
9898 searchNextBtn = findViewById(com.simplemobiletools.commons.R .id.search_next)
9999 searchClearBtn = findViewById(com.simplemobiletools.commons.R .id.search_clear)
100100
101- initViewPager(intent.getLongExtra(OPEN_NOTE_ID , - 1L ))
101+ val noteToOpen = intent.getLongExtra(OPEN_NOTE_ID , - 1L )
102+ initViewPager(noteToOpen)
102103 binding.pagerTabStrip.drawFullUnderline = false
103104 val textSize = getPercentageFontSize()
104105 binding.pagerTabStrip.setTextSize(TypedValue .COMPLEX_UNIT_PX , textSize)
105106 binding.pagerTabStrip.layoutParams.height =
106107 (textSize + resources.getDimension(com.simplemobiletools.commons.R .dimen.medium_margin) * 2 ).toInt()
107108 (binding.pagerTabStrip.layoutParams as ViewPager .LayoutParams ).isDecor = true
109+
110+ val hasNoIntent = intent.action.isNullOrEmpty() && noteToOpen == - 1L
111+
108112 checkWhatsNewDialog()
109113 checkIntents(intent)
110114
111115 storeStateVariables()
112- if (config.showNotePicker && savedInstanceState == null ) {
116+ if (config.showNotePicker && savedInstanceState == null && hasNoIntent ) {
113117 displayOpenNoteDialog()
114118 }
115119
You can’t perform that action at this time.
0 commit comments