Removing unrelated changes

pull/1457/head
Jakub Kalinowski 3 years ago
parent 30c39853e9
commit e189d17fd5

@ -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)

Loading…
Cancel
Save