Skip to content

Commit

Permalink
Lint
Browse files Browse the repository at this point in the history
  • Loading branch information
FloEdelmann committed Sep 2, 2024
1 parent 1cdf722 commit d1d0f6f
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,15 @@ import androidx.compose.material.primarySurface
import androidx.compose.runtime.Composable
import androidx.compose.runtime.rememberCoroutineScope
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.shadow
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.min
import de.westnordost.streetcomplete.R
import de.westnordost.streetcomplete.screens.user.achievements.AchievementsScreen
import de.westnordost.streetcomplete.screens.user.edits.EditStatisticsScreen
import de.westnordost.streetcomplete.screens.user.links.LinksScreen
import de.westnordost.streetcomplete.screens.user.profile.ProfileScreen
import de.westnordost.streetcomplete.screens.user.edits.EditStatisticsScreen
import de.westnordost.streetcomplete.ui.common.BackIcon
import kotlinx.coroutines.launch
import org.koin.androidx.compose.koinViewModel
Expand Down Expand Up @@ -103,7 +102,11 @@ private fun UserScreenTopAppBar(
selected = page == index,
onClick = { scope.launch { pagerState.animateScrollToPage(index) } },
icon = { Icon(icon, text) },
text = if (showText) { { Text(text) } } else null
text = if (showText) {
{ Text(text) }
} else {
null
}
)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ package de.westnordost.streetcomplete.screens.user

import de.westnordost.streetcomplete.screens.user.achievements.AchievementsViewModel
import de.westnordost.streetcomplete.screens.user.achievements.AchievementsViewModelImpl
import de.westnordost.streetcomplete.screens.user.edits.EditStatisticsViewModel
import de.westnordost.streetcomplete.screens.user.edits.EditStatisticsViewModelImpl
import de.westnordost.streetcomplete.screens.user.links.LinksViewModel
import de.westnordost.streetcomplete.screens.user.links.LinksViewModelImpl
import de.westnordost.streetcomplete.screens.user.login.LoginViewModel
import de.westnordost.streetcomplete.screens.user.login.LoginViewModelImpl
import de.westnordost.streetcomplete.screens.user.profile.ProfileViewModel
import de.westnordost.streetcomplete.screens.user.profile.ProfileViewModelImpl
import de.westnordost.streetcomplete.screens.user.edits.EditStatisticsViewModel
import de.westnordost.streetcomplete.screens.user.edits.EditStatisticsViewModelImpl
import org.koin.core.qualifier.named
import org.koin.dsl.module

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,14 @@ package de.westnordost.streetcomplete.screens.user.achievements

import androidx.compose.foundation.clickable
import androidx.compose.foundation.interaction.MutableInteractionSource
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.BoxWithConstraints
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.PaddingValues
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
import androidx.compose.foundation.layout.width
import androidx.compose.material.LocalContentColor
import androidx.compose.material.MaterialTheme
import androidx.compose.material.Text
import androidx.compose.material.contentColorFor
import androidx.compose.runtime.Composable
import androidx.compose.runtime.CompositionLocalProvider
import androidx.compose.runtime.remember
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
Expand All @@ -28,10 +20,7 @@ import androidx.compose.ui.tooling.preview.Devices
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.tooling.preview.PreviewLightDark
import androidx.compose.ui.tooling.preview.PreviewScreenSizes
import androidx.compose.ui.unit.Dp
import androidx.compose.ui.unit.coerceAtMost
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.min
import androidx.compose.ui.window.Dialog
import androidx.compose.ui.window.DialogProperties
import de.westnordost.streetcomplete.R
Expand All @@ -42,7 +31,6 @@ import de.westnordost.streetcomplete.screens.user.links.LazyLinksColumn
import de.westnordost.streetcomplete.ui.theme.AppTheme
import de.westnordost.streetcomplete.ui.theme.headlineSmall
import de.westnordost.streetcomplete.ui.theme.titleMedium
import de.westnordost.streetcomplete.ui.util.backgroundWithPadding
import de.westnordost.streetcomplete.util.ktx.openUri

@Composable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import androidx.lifecycle.ViewModel
import de.westnordost.streetcomplete.R
import de.westnordost.streetcomplete.data.AllEditTypes
import de.westnordost.streetcomplete.data.osm.edits.EditType
import de.westnordost.streetcomplete.data.user.statistics.CountryStatistics
import de.westnordost.streetcomplete.data.user.statistics.StatisticsSource
import de.westnordost.streetcomplete.util.ktx.getYamlStringMap
import de.westnordost.streetcomplete.util.ktx.launch
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
package de.westnordost.streetcomplete.screens.user.edits

import androidx.compose.foundation.Image
import androidx.compose.foundation.border
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
import androidx.compose.foundation.shape.CircleShape
import androidx.compose.material.MaterialTheme
Expand All @@ -12,10 +10,6 @@ import androidx.compose.ui.Alignment
import androidx.compose.ui.BiasAbsoluteAlignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.clip
import androidx.compose.ui.draw.drawWithContent
import androidx.compose.ui.graphics.drawOutline
import androidx.compose.ui.graphics.drawscope.Stroke
import androidx.compose.ui.graphics.drawscope.inset
import androidx.compose.ui.graphics.painter.Painter
import androidx.compose.ui.layout.ContentScale
import androidx.compose.ui.platform.LocalContext
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,6 @@ private fun RankCurrentWeekBadge(rank: Int, delay: Int) {
)
}


@Composable
private fun StarCount(count: Int) {
Row(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ fun getRankCurrentWeekProgress(rank: Int): Float =
// 2024-05: rank 370 is about top 50% of users (~20 edits), rank 100 top 5% (~300 edits)
getRankProgress(rank, maxProgressAtRank = 100, minProgressAtRank = 370)


fun getLocalRankCurrentWeekProgress(rank: Int): Float =
// 2024-05: rank 50 is about top 50% of users (~20 edits), rank 10 top 10% (~250 edits)
// in Italy, which is the top 5 country in terms of contributions
Expand Down

0 comments on commit d1d0f6f

Please sign in to comment.