Skip to content

Commit

Permalink
ui overhaul/refactors
Browse files Browse the repository at this point in the history
  • Loading branch information
yamin8000 committed Apr 28, 2023
1 parent d144a8e commit a097890
Show file tree
Hide file tree
Showing 19 changed files with 529 additions and 413 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@ local.properties
/app/src/irMarket/java/io/github/yamin8000/dooz/ad/AdConstants.kt
/app/free/
/app/irMarket/
/app/src/main/java/io/github/yamin8000/dooz/Previews.kt
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ android {
applicationId "io.github.yamin8000.dooz"
minSdk 24
targetSdk 33
versionCode 7
versionName "1.0.6"
versionCode 8
versionName "1.0.8"
vectorDrawables {
useSupportLibrary true
}
Expand Down
10 changes: 10 additions & 0 deletions app/src/main/java/io/github/yamin8000/dooz/content/About.kt
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ fun AboutContent(onBackClick: () -> Unit) {
val uriHandler = LocalUriHandler.current
val sourceUri = stringResource(R.string.github_source)
val licenseUri = stringResource(R.string.license_link)
val developerUri = stringResource(R.string.developer_uri)
Ripple(
onClick = { uriHandler.openUri(licenseUri) },
content = {
Expand Down Expand Up @@ -101,6 +102,15 @@ fun AboutContent(onBackClick: () -> Unit) {
)
}
)
Ripple(
onClick = { uriHandler.openUri(developerUri) },
content = {
Text(
text = developerUri,
textDecoration = TextDecoration.Underline
)
}
)
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ fun MainNavigation(
) {
val context = LocalContext.current
var theme by remember { mutableStateOf(ThemeSetting.System) }
val dataStore = DataStoreHelper(context.settings)

LaunchedEffect(Unit) {
val dataStore = DataStoreHelper(context.settings)
theme = ThemeSetting.valueOf(
dataStore.getString(Constants.theme) ?: ThemeSetting.System.name
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.clip
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.text.style.TextOverflow
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import io.github.yamin8000.dooz.R
Expand All @@ -50,11 +51,18 @@ fun MainTopAppBar(
val appName = stringResource(R.string.app_name)
CenterAlignedTopAppBar(
scrollBehavior = scrollBehavior,
title = { PersianText(text = appName, fontSize = 20.sp) },
navigationIcon = { AnimatedAppIcon() },
actions = {
SettingsIcon(onSettingsIconClick)
AboutIcon(onAboutIconClick)
},
title = {
PersianText(
text = appName,
fontSize = 16.sp,
maxLines = 1,
overflow = TextOverflow.Ellipsis
)
}
)
}
Expand Down
Loading

0 comments on commit a097890

Please sign in to comment.