Skip to content

Commit

Permalink
Remove Control from Options (#707)
Browse files Browse the repository at this point in the history
**Background**

 No we have Remote Control in Hub

**Changes**

Remove UI and function from VM

**Test plan**

Go to Options -> Experimental

---------

Co-authored-by: Nikita Kulikov <[email protected]>
  • Loading branch information
Programistich and LionZXY authored Sep 29, 2023
1 parent 2437354 commit b5b86a6
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 17 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
- [FIX] Fix wearos font issue
- [FIX] New mehanism emulate in Wear OS
- [FIX] New button texts on fap errors dialog
- [FIX] Remove Control from Options
- [FIX] Deprecated detekt rules
- [FIX] Fix apostrophe in text "What’s New"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import com.flipperdevices.core.preference.pb.Settings
import com.flipperdevices.settings.impl.R
import com.flipperdevices.settings.impl.composable.elements.CategoryElement
import com.flipperdevices.settings.impl.composable.elements.ClickableElement
import com.flipperdevices.settings.impl.composable.elements.GrayDivider
import com.flipperdevices.settings.impl.viewmodels.ExperimentalViewModel
import tangle.viewmodel.compose.tangleViewModel

Expand All @@ -32,14 +31,6 @@ fun ExperimentalCategory(
descriptionId = R.string.experimental_file_manager_desc,
onClick = { experimentalViewModel.onOpenFileManager(navController) }
)
GrayDivider()
ClickableElement(
titleId = R.string.experimental_screen_streaming,
descriptionId = R.string.experimental_screen_streaming_desc,
onClick = {
experimentalViewModel.onOpenScreenStreaming(navController)
}
)
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,12 @@ import com.flipperdevices.core.ui.lifecycle.LifecycleViewModel
import com.flipperdevices.filemanager.api.navigation.FileManagerEntry
import com.flipperdevices.metric.api.MetricApi
import com.flipperdevices.metric.api.events.SimpleEvent
import com.flipperdevices.settings.api.SettingsFeatureEntry
import tangle.viewmodel.VMInject
import javax.inject.Provider

class ExperimentalViewModel @VMInject constructor(
fileManagerEntryProvider: Provider<FileManagerEntry>,
metricApiProvider: Provider<MetricApi>,
private val settingsFeatureEntry: SettingsFeatureEntry
metricApiProvider: Provider<MetricApi>
) : LifecycleViewModel() {
private val fileManagerEntry by fileManagerEntryProvider
private val metricApi by metricApiProvider
Expand All @@ -22,9 +20,4 @@ class ExperimentalViewModel @VMInject constructor(
metricApi.reportSimpleEvent(SimpleEvent.EXPERIMENTAL_OPEN_FM)
navController.navigate(fileManagerEntry.fileManagerDestination())
}

fun onOpenScreenStreaming(navController: NavController) {
metricApi.reportSimpleEvent(SimpleEvent.EXPERIMENTAL_OPEN_SCREEN_STREAMING)
navController.navigate(settingsFeatureEntry.remoteControlStub())
}
}

0 comments on commit b5b86a6

Please sign in to comment.