Skip to content

Commit

Permalink
docs(readme): remove language parameter in usage section.
Browse files Browse the repository at this point in the history
  • Loading branch information
GerardPaligot committed Nov 7, 2023
1 parent 2baa142 commit b6b8438
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 35 deletions.
10 changes: 3 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
[![Build Status](https://travis-ci.org/paug/openfeedback-android-sdk.svg?branch=master)](https://travis-ci.org/paug/openfeedback-android-sdk) [ ![Download](https://api.bintray.com/packages/openfeedback/Android/feedback-android-sdk-ui/images/download.svg) ](https://bintray.com/openfeedback/Android/feedback-android-sdk-ui/_latestVersion)
[![BuildStatus](https://github.com/paug/openfeedback-android-sdk/actions/workflows/ci.yaml/badge.svg)](https://github.com/paug/openfeedback-android-sdk/actions/workflows/ci.yaml/badge.svg)

# Open-Feedback Android SDK

An Android client for Open-Feeedback https://github.com/HugoGresse/open-feedback:
Expand Down Expand Up @@ -31,8 +32,7 @@ val openfeedbackFirebaseConfig = OpenFeedbackFirebaseConfig(
OpenFeedback(
config = (application as MyApp).openfeedbackFirebaseConfig,
projectId = "<your-open-feedback-project-id>",
sessionId = "<your-open-feedback-session-id>",
language = "<language-code>"
sessionId = "<your-open-feedback-session-id>"
)
```

Expand Down Expand Up @@ -64,7 +64,3 @@ dependencies {
implementation("io.openfeedback:feedback-android-sdk-viewmodel:$openfeedbackVersion")
}
```

## Limitations and TODO

The SDK is still very young and misses some features, most notably comments. Feedbacks welcome.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
import androidx.compose.material.Scaffold
import androidx.compose.foundation.lazy.LazyColumn
import androidx.compose.material3.Scaffold
import androidx.compose.material3.Switch
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
Expand All @@ -21,7 +22,6 @@ import androidx.compose.runtime.setValue
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.unit.dp
import io.openfeedback.android.viewmodels.OpenFeedbackFirebaseConfig
import io.openfeedback.android.m2.OpenFeedback
import io.openfeedback.android.sample.theme.DesignSystem
import io.openfeedback.android.sample.theme.OpenFeedbackTheme
Expand All @@ -31,42 +31,46 @@ class MainActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
val projectId = "mMHR63ARZQpPidFQISyc"
val sessionId = "173222"
val openFeedbackFirebaseConfig = (application as MainApplication).openFeedbackFirebaseConfig
setContent {
var designSystem by rememberSaveable { mutableStateOf(DesignSystem.M2) }
var designSystem by rememberSaveable { mutableStateOf(DesignSystem.M3) }
val isDark = isSystemInDarkTheme()
var isLight by rememberSaveable(isDark) { mutableStateOf(isDark.not()) }
OpenFeedbackTheme(
designSystem = designSystem,
isLight = isLight
) {
Column {
ThemeSwitcher(
designSystem = designSystem,
isLight = isLight,
onDesignSystemChanged = { designSystem = it },
onLightDarkChanged = { isLight = it }
)
when (designSystem) {
DesignSystem.M2 -> Scaffold {
OpenFeedback(
config = openFeedbackFirebaseConfig,
projectId = projectId,
sessionId = "173222",
modifier = Modifier
.padding(it)
.padding(horizontal = 8.dp, vertical = 4.dp)
Scaffold {
LazyColumn(contentPadding = it) {
item {
ThemeSwitcher(
designSystem = designSystem,
isLight = isLight,
onDesignSystemChanged = { designSystem = it },
onLightDarkChanged = { isLight = it }
)
}
DesignSystem.M3 -> androidx.compose.material3.Scaffold {
io.openfeedback.android.m3.OpenFeedback(
config = openFeedbackFirebaseConfig,
projectId = projectId,
sessionId = "173222",
modifier = Modifier
.padding(it)
.padding(horizontal = 8.dp, vertical = 4.dp)
)
item {
when (designSystem) {
DesignSystem.M2 ->
OpenFeedback(
config = openFeedbackFirebaseConfig,
projectId = projectId,
sessionId = sessionId,
modifier = Modifier
.padding(horizontal = 8.dp, vertical = 4.dp)
)

DesignSystem.M3 ->
io.openfeedback.android.m3.OpenFeedback(
config = openFeedbackFirebaseConfig,
projectId = projectId,
sessionId = sessionId,
modifier = Modifier
.padding(horizontal = 8.dp, vertical = 4.dp)
)
}
}
}
}
Expand Down

0 comments on commit b6b8438

Please sign in to comment.