Remove dead code.

This commit is contained in:
Benoit Marty
2023-07-03 16:58:43 +02:00
committed by Benoit Marty
parent 8e36776c5f
commit 976ee893e2
8 changed files with 0 additions and 61 deletions

View File

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

View File

@@ -25,15 +25,8 @@ class AboutPresenter @Inject constructor() : Presenter<AboutState> {
@Composable
override fun present(): AboutState {
fun handleEvents(event: AboutEvents) {
when (event) {
AboutEvents.MyEvent -> Unit
}
}
return AboutState(
elementLegals = getAllLegals(),
eventSink = ::handleEvents
)
}
}

View File

@@ -16,9 +16,7 @@
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.
data class AboutState(
val elementLegals: List<ElementLegal>,
val eventSink: (AboutEvents) -> Unit
)

View File

@@ -27,5 +27,4 @@ open class AboutStateProvider : PreviewParameterProvider<AboutState> {
fun aAboutState() = AboutState(
elementLegals = getAllLegals(),
eventSink = {}
)

View File

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

View File

@@ -29,15 +29,8 @@ class AnalyticsSettingsPresenter @Inject constructor(
override fun present(): AnalyticsSettingsState {
val analyticsState = analyticsPresenter.present()
fun handleEvents(event: AnalyticsSettingsEvents) {
when (event) {
AnalyticsSettingsEvents.MyEvent -> Unit
}
}
return AnalyticsSettingsState(
analyticsState = analyticsState,
eventSink = ::handleEvents
)
}
}

View File

@@ -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.
data class AnalyticsSettingsState(
val analyticsState: AnalyticsPreferencesState,
val eventSink: (AnalyticsSettingsEvents) -> Unit
)

View File

@@ -28,5 +28,4 @@ open class AnalyticsSettingsStateProvider : PreviewParameterProvider<AnalyticsSe
fun aAnalyticsSettingsState() = AnalyticsSettingsState(
analyticsState = aAnalyticsPreferencesState(),
eventSink = {}
)