@@ -29,14 +29,12 @@ import androidx.compose.runtime.LaunchedEffect
2929import androidx.compose.runtime.getValue
3030import androidx.compose.runtime.key
3131import androidx.compose.runtime.mutableStateOf
32- import androidx.compose.runtime.remember
3332import androidx.compose.runtime.saveable.rememberSaveable
3433import androidx.compose.runtime.setValue
3534import androidx.compose.ui.Alignment
3635import androidx.compose.ui.Modifier
3736import androidx.compose.ui.graphics.Color
3837import androidx.compose.ui.graphics.vector.ImageVector
39- import androidx.compose.ui.platform.LocalContext
4038import androidx.compose.ui.res.stringResource
4139import androidx.compose.ui.text.font.FontWeight
4240import androidx.compose.ui.text.style.TextAlign
@@ -47,7 +45,6 @@ import com.yangdai.opennote.data.local.entity.FolderEntity
4745import com.yangdai.opennote.presentation.navigation.Screen
4846import com.yangdai.opennote.presentation.navigation.Screen.Folders
4947import com.yangdai.opennote.presentation.navigation.Screen.Settings
50- import com.yangdai.opennote.presentation.util.getAppName
5148
5249@Composable
5350fun DrawerContent (
@@ -62,10 +59,6 @@ fun DrawerContent(
6259 .fillMaxWidth()
6360 .verticalScroll(rememberScrollState())
6461) {
65- val context = LocalContext .current
66- val appName = remember { context.getAppName() }
67-
68-
6962 Row (
7063 modifier = Modifier
7164 .fillMaxWidth()
@@ -74,7 +67,7 @@ fun DrawerContent(
7467 verticalAlignment = Alignment .CenterVertically
7568 ) {
7669 Text (
77- text = appName ,
70+ text = stringResource( R .string.app_name) ,
7871 style = MaterialTheme .typography.titleLarge,
7972 color = MaterialTheme .colorScheme.onSurface,
8073 fontWeight = FontWeight .SemiBold ,
0 commit comments