mirror of
https://github.com/iSoron/uhabits.git
synced 2025-12-05 16:58:52 -06:00
Removing unrelated changes
This commit is contained in:
@@ -31,7 +31,7 @@ import org.isoron.uhabits.utils.toPaletteColor
|
||||
class ColorPickerDialog : ColorPickerDialog() {
|
||||
fun setListener(callback: OnColorPickedCallback) {
|
||||
super.setOnColorSelectedListener { c: Int ->
|
||||
val pc = c.toPaletteColor(requireContext())
|
||||
val pc = c.toPaletteColor(context!!)
|
||||
callback.onColorPicked(pc)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -51,12 +51,12 @@ class HistoryEditorDialog : AppCompatDialogFragment(), CommandRunner.Listener {
|
||||
|
||||
override fun onCreateDialog(savedInstanceState: Bundle?): Dialog {
|
||||
clearCurrentDialog()
|
||||
val component = (requireActivity().application as HabitsApplication).component
|
||||
val component = (activity!!.application as HabitsApplication).component
|
||||
commandRunner = component.commandRunner
|
||||
habit = component.habitList.getById(requireArguments().getLong("habit"))!!
|
||||
habit = component.habitList.getById(arguments!!.getLong("habit"))!!
|
||||
preferences = component.preferences
|
||||
|
||||
val themeSwitcher = AndroidThemeSwitcher(requireActivity(), preferences)
|
||||
val themeSwitcher = AndroidThemeSwitcher(activity!!, preferences)
|
||||
themeSwitcher.apply()
|
||||
|
||||
chart = HistoryChart(
|
||||
@@ -71,10 +71,10 @@ class HistoryEditorDialog : AppCompatDialogFragment(), CommandRunner.Listener {
|
||||
onDateClickedListener = onDateClickedListener ?: object : OnDateClickedListener {},
|
||||
padding = 10.0,
|
||||
)
|
||||
dataView = AndroidDataView(requireContext(), null)
|
||||
dataView = AndroidDataView(context!!, null)
|
||||
dataView.view = chart!!
|
||||
|
||||
val dialog = Dialog(requireContext()).apply {
|
||||
val dialog = Dialog(context!!).apply {
|
||||
val metrics = resources.displayMetrics
|
||||
val maxHeight = resources.getDimensionPixelSize(R.dimen.history_editor_max_height)
|
||||
setContentView(dataView)
|
||||
|
||||
@@ -61,7 +61,7 @@ class WeekdayPickerDialog :
|
||||
|
||||
override fun onCreateDialog(savedInstanceState: Bundle?): Dialog {
|
||||
val builder = AlertDialog.Builder(
|
||||
requireActivity()
|
||||
activity!!
|
||||
)
|
||||
builder
|
||||
.setTitle(R.string.select_weekdays)
|
||||
|
||||
Reference in New Issue
Block a user