Skip to content

Commit c12e478

Browse files
committed
Make bio editor use source note (which is markdown)
1 parent ebd7fb9 commit c12e478

2 files changed

Lines changed: 7 additions & 4 deletions

File tree

shared/src/commonMain/composeResources/values/strings.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@
132132

133133
<string name="bookmarks">Bookmarks</string>
134134

135+
<string name="editing_profile">Editing profile</string>
135136
<string name="automated_account">Automated account</string>
136137
<string name="locked_account">Locked account</string>
137138
<string name="locked_account_description">New followers will have to be approved before following you</string>

shared/src/commonMain/kotlin/site/remlit/snowdrop/view/EditProfileView.kt

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import androidx.compose.material3.FilledTonalButton
99
import androidx.compose.material3.Icon
1010
import androidx.compose.material3.IconButton
1111
import androidx.compose.material3.ListItem
12+
import androidx.compose.material3.OutlinedTextField
1213
import androidx.compose.material3.Switch
1314
import androidx.compose.material3.Text
1415
import androidx.compose.material3.TextField
@@ -38,6 +39,7 @@ import snowdrop.shared.generated.resources.automated_account
3839
import snowdrop.shared.generated.resources.discoverable
3940
import snowdrop.shared.generated.resources.discoverable_description
4041
import snowdrop.shared.generated.resources.edit_profile
42+
import snowdrop.shared.generated.resources.editing_profile
4143
import snowdrop.shared.generated.resources.icon_arrow_back_24
4244
import snowdrop.shared.generated.resources.locked_account
4345
import snowdrop.shared.generated.resources.locked_account_description
@@ -88,7 +90,7 @@ fun EditProfileView() = ViewSurface {
8890

8991
LaunchedEffect(currentAccount) {
9092
displayName = currentAccount?.displayName ?: ""
91-
note = currentAccount?.note ?: ""
93+
note = currentAccount?.source?.note ?: ""
9294

9395
bot = currentAccount?.bot ?: false
9496
locked = currentAccount?.locked ?: false
@@ -104,7 +106,7 @@ fun EditProfileView() = ViewSurface {
104106
}
105107
},
106108
title = {
107-
Text(stringResource(Res.string.edit_profile))
109+
Text(stringResource(Res.string.editing_profile))
108110
},
109111
actions = {
110112
FilledTonalButton(
@@ -143,7 +145,7 @@ fun EditProfileView() = ViewSurface {
143145
verticalArrangement = Arrangement.spacedBy(10.dp)
144146
) {
145147
item {
146-
TextField(
148+
OutlinedTextField(
147149
value = displayName,
148150
onValueChange = { displayName = it; displayNameChanged = true },
149151
maxLines = 1,
@@ -155,7 +157,7 @@ fun EditProfileView() = ViewSurface {
155157

156158
item {
157159
// todo: make it source and not html
158-
TextField(
160+
OutlinedTextField(
159161
value = note,
160162
onValueChange = { note = it; noteChanged = true },
161163
label = { Text("Description") },

0 commit comments

Comments
 (0)