Skip to content

Commit

Permalink
chore: fix some linter warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Bnyro committed May 27, 2024
1 parent 4806895 commit bb82b6e
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.padding
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.ArrowBack
import androidx.compose.material3.Divider
import androidx.compose.material3.HorizontalDivider
import androidx.compose.material3.ExperimentalMaterial3Api
import androidx.compose.material3.Scaffold
import androidx.compose.material3.Text
Expand Down Expand Up @@ -55,7 +55,7 @@ fun AboutScreen(onBackPress: () -> Unit) {
painter = painterResource(R.drawable.ic_launcher_foreground),
contentDescription = null
)
Divider(
HorizontalDivider(
modifier = Modifier
.fillMaxWidth()
.height(2.dp)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ import kotlinx.coroutines.withContext

class CallModel(private val application: Application, savedStateHandle: SavedStateHandle) :
AndroidViewModel(application) {
val callLogRepository = (application as App).callLogRepository
val phoneLookupRepository = (application as App).phoneLookupRepository
private val callLogRepository = (application as App).callLogRepository
private val phoneLookupRepository = (application as App).phoneLookupRepository

val initialPhoneNumber = savedStateHandle.get<String>(HomeRoutes.Phone.phoneNumber)

Expand All @@ -61,8 +61,7 @@ class CallModel(private val application: Application, savedStateHandle: SavedSta
val subscriptions =
SmsUtil.getSubscriptions(application.applicationContext)

var chosenSubInfo =
subscriptions.firstOrNull()
private var chosenSubInfo = subscriptions.firstOrNull()


init {
Expand All @@ -75,7 +74,7 @@ class CallModel(private val application: Application, savedStateHandle: SavedSta
}

fun onSubscriptionIndexChange(index: Int) {
chosenSubInfo = subscriptions.get(index)
chosenSubInfo = subscriptions[index]
}

fun onNumberInput(digit: String) {
Expand Down Expand Up @@ -137,7 +136,7 @@ class CallModel(private val application: Application, savedStateHandle: SavedSta
}
}

fun playToneForDigit(digit: String) {
private fun playToneForDigit(digit: String) {
val numericDigit = when (digit) {
"0" -> ToneGenerator.TONE_DTMF_0
"1" -> ToneGenerator.TONE_DTMF_1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import androidx.compose.foundation.rememberScrollState
import androidx.compose.foundation.verticalScroll
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.ArrowBack
import androidx.compose.material3.Divider
import androidx.compose.material3.HorizontalDivider
import androidx.compose.material3.ExperimentalMaterial3Api
import androidx.compose.material3.LargeTopAppBar
import androidx.compose.material3.MaterialTheme
Expand Down Expand Up @@ -96,7 +96,7 @@ fun SettingsScreen(themeModel: ThemeModel, smsModel: SmsModel, onBackPress: () -
) {
themeModel.colorfulIcons = it
}
Divider(
HorizontalDivider(
modifier = Modifier.padding(top = 12.dp, bottom = 8.dp),
color = MaterialTheme.colorScheme.surfaceVariant
)
Expand All @@ -108,7 +108,7 @@ fun SettingsScreen(themeModel: ThemeModel, smsModel: SmsModel, onBackPress: () -
) {
smsModel.refreshLocalSmsPreference()
}
Divider(
HorizontalDivider(
modifier = Modifier.padding(top = 12.dp, bottom = 8.dp),
color = MaterialTheme.colorScheme.surfaceVariant
)
Expand All @@ -126,7 +126,7 @@ fun SettingsScreen(themeModel: ThemeModel, smsModel: SmsModel, onBackPress: () -
) {
themeModel.collapsableBottomBar = it
}
Divider(
HorizontalDivider(
modifier = Modifier.padding(top = 12.dp, bottom = 8.dp),
color = MaterialTheme.colorScheme.surfaceVariant
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import androidx.compose.foundation.lazy.rememberLazyListState
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.foundation.text.ClickableText
import androidx.compose.foundation.text.selection.SelectionContainer
import androidx.compose.material3.Divider
import androidx.compose.material3.HorizontalDivider
import androidx.compose.material3.ExperimentalMaterial3Api
import androidx.compose.material3.LocalContentColor
import androidx.compose.material3.MaterialTheme
Expand Down Expand Up @@ -158,7 +158,7 @@ fun DayHeader(dayString: String) {

@Composable
private fun RowScope.DayHeaderLine() {
Divider(
HorizontalDivider(
modifier = Modifier
.weight(1f)
.align(Alignment.CenterVertically),
Expand Down

0 comments on commit bb82b6e

Please sign in to comment.