Skip to content

Commit 45e2e0c

Browse files
committed
minor code style update
1 parent 6441100 commit 45e2e0c

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

app/src/main/kotlin/com/simplemobiletools/notes/activities/MainActivity.kt

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ class MainActivity : SimpleActivity(), ViewPager.OnPageChangeListener {
4040
lateinit var mAdapter: NotesPagerAdapter
4141
lateinit var mDb: DBHelper
4242
lateinit var mNotes: List<Note>
43+
4344
var noteViewWithTextSelected: MyEditText? = null
4445

4546
override fun onCreate(savedInstanceState: Bundle?) {
@@ -122,7 +123,7 @@ class MainActivity : SimpleActivity(), ViewPager.OnPageChangeListener {
122123
// https://code.google.com/p/android/issues/detail?id=191430 quickfix
123124
override fun onActionModeStarted(mode: ActionMode?) {
124125
super.onActionModeStarted(mode)
125-
with(currentNotesView()) {
126+
currentNotesView().apply {
126127
if (config.clickableLinks || movementMethod == LinkMovementMethod.getInstance()) {
127128
movementMethod = ArrowKeyMovementMethod.getInstance()
128129
noteViewWithTextSelected = this
@@ -133,9 +134,7 @@ class MainActivity : SimpleActivity(), ViewPager.OnPageChangeListener {
133134
override fun onActionModeFinished(mode: ActionMode?) {
134135
super.onActionModeFinished(mode)
135136
if (config.clickableLinks) {
136-
noteViewWithTextSelected?.let {
137-
it.movementMethod = LinkMovementMethod.getInstance()
138-
}
137+
noteViewWithTextSelected?.movementMethod = LinkMovementMethod.getInstance()
139138
}
140139
}
141140

0 commit comments

Comments
 (0)