Remove dead code.
This commit is contained in:
parent
8e36776c5f
commit
976ee893e2
8 changed files with 0 additions and 61 deletions
|
|
@ -1,21 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright (c) 2023 New Vector Ltd
|
|
||||||
*
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package io.element.android.features.preferences.impl.about
|
|
||||||
|
|
||||||
sealed interface AboutEvents {
|
|
||||||
object MyEvent : AboutEvents
|
|
||||||
}
|
|
||||||
|
|
@ -25,15 +25,8 @@ class AboutPresenter @Inject constructor() : Presenter<AboutState> {
|
||||||
@Composable
|
@Composable
|
||||||
override fun present(): AboutState {
|
override fun present(): AboutState {
|
||||||
|
|
||||||
fun handleEvents(event: AboutEvents) {
|
|
||||||
when (event) {
|
|
||||||
AboutEvents.MyEvent -> Unit
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return AboutState(
|
return AboutState(
|
||||||
elementLegals = getAllLegals(),
|
elementLegals = getAllLegals(),
|
||||||
eventSink = ::handleEvents
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -16,9 +16,7 @@
|
||||||
|
|
||||||
package io.element.android.features.preferences.impl.about
|
package io.element.android.features.preferences.impl.about
|
||||||
|
|
||||||
// TODO add your ui models. Remove the eventSink if you don't have events.
|
|
||||||
// Do not use default value, so no member get forgotten in the presenters.
|
// Do not use default value, so no member get forgotten in the presenters.
|
||||||
data class AboutState(
|
data class AboutState(
|
||||||
val elementLegals: List<ElementLegal>,
|
val elementLegals: List<ElementLegal>,
|
||||||
val eventSink: (AboutEvents) -> Unit
|
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -27,5 +27,4 @@ open class AboutStateProvider : PreviewParameterProvider<AboutState> {
|
||||||
|
|
||||||
fun aAboutState() = AboutState(
|
fun aAboutState() = AboutState(
|
||||||
elementLegals = getAllLegals(),
|
elementLegals = getAllLegals(),
|
||||||
eventSink = {}
|
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -1,21 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright (c) 2023 New Vector Ltd
|
|
||||||
*
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package io.element.android.features.preferences.impl.analytics
|
|
||||||
|
|
||||||
sealed interface AnalyticsSettingsEvents {
|
|
||||||
object MyEvent : AnalyticsSettingsEvents
|
|
||||||
}
|
|
||||||
|
|
@ -29,15 +29,8 @@ class AnalyticsSettingsPresenter @Inject constructor(
|
||||||
override fun present(): AnalyticsSettingsState {
|
override fun present(): AnalyticsSettingsState {
|
||||||
val analyticsState = analyticsPresenter.present()
|
val analyticsState = analyticsPresenter.present()
|
||||||
|
|
||||||
fun handleEvents(event: AnalyticsSettingsEvents) {
|
|
||||||
when (event) {
|
|
||||||
AnalyticsSettingsEvents.MyEvent -> Unit
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return AnalyticsSettingsState(
|
return AnalyticsSettingsState(
|
||||||
analyticsState = analyticsState,
|
analyticsState = analyticsState,
|
||||||
eventSink = ::handleEvents
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -21,5 +21,4 @@ import io.element.android.features.analytics.api.preferences.AnalyticsPreference
|
||||||
// Do not use default value, so no member get forgotten in the presenters.
|
// Do not use default value, so no member get forgotten in the presenters.
|
||||||
data class AnalyticsSettingsState(
|
data class AnalyticsSettingsState(
|
||||||
val analyticsState: AnalyticsPreferencesState,
|
val analyticsState: AnalyticsPreferencesState,
|
||||||
val eventSink: (AnalyticsSettingsEvents) -> Unit
|
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -28,5 +28,4 @@ open class AnalyticsSettingsStateProvider : PreviewParameterProvider<AnalyticsSe
|
||||||
|
|
||||||
fun aAnalyticsSettingsState() = AnalyticsSettingsState(
|
fun aAnalyticsSettingsState() = AnalyticsSettingsState(
|
||||||
analyticsState = aAnalyticsPreferencesState(),
|
analyticsState = aAnalyticsPreferencesState(),
|
||||||
eventSink = {}
|
|
||||||
)
|
)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue