Skip to content

Commit

Permalink
REM-842 - Clean up code after remove MelodyView, LoudnessPickerView a…
Browse files Browse the repository at this point in the history
…nd WindowTypeView
  • Loading branch information
naz013 committed Mar 16, 2024
1 parent f0f7354 commit 269e5d8
Show file tree
Hide file tree
Showing 55 changed files with 3 additions and 1,292 deletions.
24 changes: 0 additions & 24 deletions app/src/main/java/com/elementary/tasks/core/utils/ExtFunctions.kt
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,10 @@ import com.elementary.tasks.core.views.ExclusionPickerView
import com.elementary.tasks.core.views.ExportToCalendarView
import com.elementary.tasks.core.views.ExportToGoogleTasksView
import com.elementary.tasks.core.views.LedPickerView
import com.elementary.tasks.core.views.LoudnessPickerView
import com.elementary.tasks.core.views.MelodyView
import com.elementary.tasks.core.views.PriorityPickerView
import com.elementary.tasks.core.views.RepeatLimitView
import com.elementary.tasks.core.views.RepeatView
import com.elementary.tasks.core.views.TuneExtraView
import com.elementary.tasks.core.views.WindowTypeView
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.CoroutineStart
import kotlinx.coroutines.Dispatchers
Expand Down Expand Up @@ -260,41 +257,20 @@ fun ActionView.bindProperty(value: String, listener: ((String) -> Unit)) {
})
}

fun MelodyView.bindProperty(value: String, listener: ((String) -> Unit)) {
this.file = value
this.onFileUpdateListener = {
listener.invoke(it)
}
}

fun AttachmentView.bindProperty(value: String, listener: ((String) -> Unit)) {
this.content = value
this.onFileUpdateListener = {
listener.invoke(it)
}
}

fun LoudnessPickerView.bindProperty(value: Int, listener: ((Int) -> Unit)) {
this.setVolume(value)
this.onLevelUpdateListener = {
listener.invoke(it)
}
}

fun RepeatLimitView.bindProperty(value: Int, listener: ((Int) -> Unit)) {
this.setLimit(value)
this.onLevelUpdateListener = {
listener.invoke(it)
}
}

fun WindowTypeView.bindProperty(value: Int, listener: ((Int) -> Unit)) {
this.windowType = value
this.onTypeChaneListener = {
listener.invoke(it)
}
}

fun LedPickerView.bindProperty(value: Int, listener: ((Int) -> Unit)) {
this.led = value
this.onLedChangeListener = {
Expand Down

This file was deleted.

73 changes: 0 additions & 73 deletions app/src/main/java/com/elementary/tasks/core/views/MelodyView.kt

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -104,17 +104,14 @@ class ApplicationFragment : RepeatableTypeFragment<FragmentReminderApplicationBi
binding.exportToCalendar,
binding.exportToTasks,
binding.tuneExtraView,
binding.melodyView,
binding.attachmentView,
binding.groupView,
binding.taskSummary,
binding.beforeView,
binding.dateView,
binding.loudnessView,
binding.priorityView,
binding.repeatLimitView,
binding.repeatView,
binding.windowTypeView
binding.repeatView
)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,17 +88,14 @@ class DateFragment : RepeatableTypeFragment<FragmentReminderDateBinding>() {
binding.exportToCalendar,
binding.exportToTasks,
binding.tuneExtraView,
binding.melodyView,
binding.attachmentView,
binding.groupView,
binding.taskSummary,
binding.beforeView,
binding.dateView,
binding.loudnessView,
binding.priorityView,
binding.repeatLimitView,
binding.repeatView,
binding.windowTypeView,
binding.actionView
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,17 +77,14 @@ class EmailFragment : RepeatableTypeFragment<FragmentReminderEmailBinding>() {
binding.exportToCalendar,
binding.exportToTasks,
binding.tuneExtraView,
binding.melodyView,
binding.attachmentView,
binding.groupView,
binding.taskSummary,
binding.beforeView,
binding.dateView,
binding.loudnessView,
binding.priorityView,
binding.repeatLimitView,
binding.repeatView,
binding.windowTypeView
binding.repeatView
)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,14 +173,11 @@ class LocationFragment : RadiusTypeFragment<FragmentReminderLocationBinding>() {
return listOfNotNull(
binding.ledView,
binding.tuneExtraView,
binding.melodyView,
binding.attachmentView,
binding.groupView,
binding.taskSummary,
binding.dateView,
binding.loudnessView,
binding.priorityView,
binding.windowTypeView,
binding.actionView
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,16 +97,13 @@ class MonthFragment : RepeatableTypeFragment<FragmentReminderMonthBinding>() {
binding.exportToCalendar,
binding.exportToTasks,
binding.tuneExtraView,
binding.melodyView,
binding.attachmentView,
binding.groupView,
binding.taskSummary,
binding.beforeView,
binding.loudnessView,
binding.priorityView,
binding.repeatLimitView,
binding.repeatView,
binding.windowTypeView,
binding.actionView
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,14 +151,11 @@ class PlacesTypeFragment : RadiusTypeFragment<FragmentReminderPlaceBinding>() {
return listOfNotNull(
binding.ledView,
binding.tuneExtraView,
binding.melodyView,
binding.attachmentView,
binding.groupView,
binding.taskSummary,
binding.dateView,
binding.loudnessView,
binding.priorityView,
binding.windowTypeView,
binding.actionView
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,14 +95,11 @@ class ShopFragment : RepeatableTypeFragment<FragmentReminderShopBinding>() {
return listOfNotNull(
binding.ledView,
binding.tuneExtraView,
binding.melodyView,
binding.attachmentView,
binding.groupView,
binding.taskSummary,
binding.dateView,
binding.loudnessView,
binding.priorityView,
binding.windowTypeView
binding.priorityView
)
}

Expand Down
Loading

0 comments on commit 269e5d8

Please sign in to comment.