Skip to content

Commit

Permalink
Move ImportScenesDialog from fragments to dialogs.
Browse files Browse the repository at this point in the history
  • Loading branch information
thetwom committed Jun 13, 2022
1 parent 4f99c73 commit a4dfc42
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package de.moekadu.metronome.fragments
package de.moekadu.metronome.dialogs

import android.app.Dialog
import android.os.Bundle
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ import androidx.recyclerview.widget.RecyclerView
import com.google.android.material.snackbar.Snackbar
import de.moekadu.metronome.*
import de.moekadu.metronome.dialogs.ClearAllSavedScenesDialog
import de.moekadu.metronome.dialogs.ImportScenesDialog
import de.moekadu.metronome.dialogs.ScenesSharingDialog
import de.moekadu.metronome.metronomeproperties.durationInMillis
import de.moekadu.metronome.players.PlayerStatus
Expand Down Expand Up @@ -70,6 +71,7 @@ class ScenesFragment : Fragment() {
)
MetronomeViewModel.Factory(playerConnection)
}

private var speedLimiter: SpeedLimiter? = null
private var sharedPreferenceChangeListener: SharedPreferences.OnSharedPreferenceChangeListener? = null

Expand Down Expand Up @@ -185,7 +187,7 @@ class ScenesFragment : Fragment() {
Toast.makeText(requireContext(), R.string.no_scenes_for_sharing, Toast.LENGTH_LONG).show()
} else if (scenes != null) {
val dialogFragment = ScenesSharingDialog(scenes.scenes)
dialogFragment.show(requireActivity().supportFragmentManager, "tag")
dialogFragment.show(parentFragmentManager, "tag")
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import android.widget.Toast
import androidx.activity.result.contract.ActivityResultContract
import androidx.core.database.getStringOrNull
import de.moekadu.metronome.R
import de.moekadu.metronome.fragments.ImportScenesDialog
import de.moekadu.metronome.dialogs.ImportScenesDialog
import de.moekadu.metronome.fragments.ScenesFragment

class SceneArchiving(private val scenesFragment: ScenesFragment) {
Expand Down

0 comments on commit a4dfc42

Please sign in to comment.