Skip to content

Commit eae0176

Browse files
committed
Fix for PR : reduced lines lenght + optimized imports
1 parent fb9e246 commit eae0176

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

app/src/main/kotlin/org/fossify/notes/dialogs/ChecklistItemDialogFragment.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,8 @@ class ChecklistItemDialogFragment : DialogFragment() {
118118
val rowBinding = ItemAddChecklistBinding.inflate(layoutInflater)
119119

120120
// We disable automatic state saving for this view.
121-
// This prevents Android from confusing the multiple EditTexts (which all share the same ID) and overwriting our manually restored text with the last view's text.
121+
// This prevents Android from confusing the multiple EditTexts (which all share the same ID)
122+
// and overwriting our manually restored text with the last view's text.
122123
rowBinding.titleEditText.isSaveEnabled = false
123124

124125
rowBinding.titleEditText.setText(text)

app/src/main/kotlin/org/fossify/notes/fragments/TasksFragment.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ import org.fossify.notes.activities.SimpleActivity
1515
import org.fossify.notes.adapters.TasksAdapter
1616
import org.fossify.notes.databinding.FragmentChecklistBinding
1717
import org.fossify.notes.dialogs.ChecklistItemDialogFragment
18-
import org.fossify.notes.dialogs.EditTaskDialog
19-
import org.fossify.notes.dialogs.NewChecklistItemDialog
2018
import org.fossify.notes.extensions.config
2119
import org.fossify.notes.extensions.updateWidgets
2220
import org.fossify.notes.helpers.NOTE_ID
@@ -48,7 +46,9 @@ class TasksFragment : NoteFragment(), TasksActionListener {
4846
super.onViewCreated(view, savedInstanceState)
4947

5048
// Listen for results from the ChecklistItemDialogFragment
51-
childFragmentManager.setFragmentResultListener(ChecklistItemDialogFragment.REQUEST_KEY, viewLifecycleOwner) { _, bundle ->
49+
childFragmentManager.setFragmentResultListener(ChecklistItemDialogFragment.REQUEST_KEY,
50+
viewLifecycleOwner)
51+
{ _, bundle ->
5252
val text = bundle.getString(ChecklistItemDialogFragment.RESULT_TEXT_KEY) ?: return@setFragmentResultListener
5353
val taskId = bundle.getInt(ChecklistItemDialogFragment.RESULT_TASK_ID_KEY, -1)
5454

0 commit comments

Comments
 (0)