Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified Prezel/app/src/main/ic_launcher-playstore.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 15 additions & 1 deletion Prezel/app/src/main/res/drawable/ic_launcher_background.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (C) 2026 The Android Open Source Project
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<vector
android:height="108dp"
android:width="108dp"
Expand Down
19 changes: 17 additions & 2 deletions Prezel/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (C) 2026 The Android Open Source Project
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_background"/>
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
</adaptive-icon>
<monochrome android:drawable="@mipmap/ic_launcher_foreground"/>
</adaptive-icon>
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_background"/>
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
</adaptive-icon>
<background android:drawable="@drawable/ic_launcher_background" />
<foreground android:drawable="@mipmap/ic_launcher_foreground" />
<monochrome android:drawable="@mipmap/ic_launcher_foreground" />
</adaptive-icon>
Binary file modified Prezel/app/src/main/res/mipmap-hdpi/ic_launcher.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Prezel/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Prezel/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Prezel/app/src/main/res/mipmap-mdpi/ic_launcher.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Prezel/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Prezel/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Prezel/app/src/main/res/mipmap-xhdpi/ic_launcher.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Prezel/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Prezel/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Prezel/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Prezel/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Prezel/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ internal fun PresentationSentenceAnalysisResponse.toDomain(): SentenceAnalysisDe
status = WordAnalysisStatus.from(value = status),
mainFeedback = mainFeedback,
subFeedback = subFeedback,
guideScript = guideScript,
accuracy = accuracy,
startTimeMs = startTimeMs,
endTimeMs = endTimeMs,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ fun PrezelAccordion(
),
size = if (nested) PrezelListSize.SMALL else PrezelListSize.REGULAR,
nested = nested,
titleTextColor = PrezelTheme.colors.textLarge,
leadingContent = leadingContent,
trailingContent = {
trailingContent?.invoke()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ data class SentenceAnalysisDetail(
val status: WordAnalysisStatus,
val mainFeedback: String,
val subFeedback: String,
val guideScript: String = "",
val accuracy: Double,
val startTimeMs: Long,
val endTimeMs: Long,
Expand All @@ -32,10 +33,10 @@ enum class WordAnalysisStatus(
) {
EXCELLENT("Excellent"),
GOOD("Good"),
STUTTER("Stutter"),
INSERTION("Insertion"),
OMISSION("Omission"),
STUTTER("Stutter"),
MISPRONUNCIATION("Mispronunciation"),
OMISSION("Omission"),
UNKNOWN("Unknown"),
;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ data class PresentationSentenceAnalysisResponse(
val mainFeedback: String,
@SerialName("subFeedback")
val subFeedback: String,
@SerialName("guideScript")
val guideScript: String = "",
@SerialName("accuracy")
val accuracy: Double,
@SerialName("startTimeMs")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
package com.team.prezel.feature.report.impl.accuracydetail

import android.annotation.SuppressLint
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.heightIn
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.pager.PagerState
import androidx.compose.foundation.pager.rememberPagerState
Expand All @@ -20,13 +22,13 @@ import androidx.compose.runtime.getValue
import androidx.compose.runtime.remember
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.platform.LocalConfiguration
import androidx.compose.ui.platform.LocalResources
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.unit.Dp
import androidx.compose.ui.unit.dp
import androidx.lifecycle.compose.collectAsStateWithLifecycle
import com.team.prezel.core.designsystem.component.feedback.snackbar.showPrezelSnackbar
import com.team.prezel.core.designsystem.component.navigations.PrezelTabSize
import com.team.prezel.core.designsystem.component.navigations.PrezelTabs
import com.team.prezel.core.designsystem.component.player.PrezelPlayerItem
import com.team.prezel.core.designsystem.component.player.PrezelPlayerState
Expand Down Expand Up @@ -136,7 +138,7 @@ private fun AccuracyDetailScreenContent(
AccuracyDetailTab.SCRIPT_MATCH -> sentenceDetails.filter { detail -> detail.isScriptMatchIssue }
}.toImmutableList()
}
val sheetPeekHeight = rememberPlayerSheetPeekHeight(markerSentenceDetails = playerMarkerSentenceDetails)
val sheetPeekHeight = AccuracyDetailPlayerSheetPeekHeight
val playerState = rememberDetailPlayerState(
selectedTab = selectedTab,
sentenceDetails = sentenceDetails,
Expand Down Expand Up @@ -180,16 +182,6 @@ private fun rememberAccuracyDetailTabs(): List<AccuracyDetailTab> =
)
}

@Composable
private fun rememberPlayerSheetPeekHeight(markerSentenceDetails: ImmutableList<SentenceAnalysisUiModel>): Dp =
remember(markerSentenceDetails) {
if (markerSentenceDetails.isEmpty()) {
AccuracyDetailPlayerSheetDefaultPeekHeight
} else {
AccuracyDetailPlayerSheetLargePeekHeight
}
}

@Composable
private fun rememberDetailPlayerState(
selectedTab: AccuracyDetailTab,
Expand Down Expand Up @@ -267,6 +259,7 @@ private fun PlaybackEffect(
}
}

@SuppressLint("ConfigurationScreenWidthHeight")
@OptIn(ExperimentalMaterial3Api::class)
@Composable
private fun AccuracyDetailScaffold(
Expand All @@ -282,6 +275,9 @@ private fun AccuracyDetailScaffold(
onClickTab: (Int) -> Unit,
pagerState: PagerState,
) {
val configuration = LocalConfiguration.current
val expandedSheetMaxHeight = configuration.screenHeightDp.dp - AccuracyDetailExpandedSheetTopGap

BottomSheetScaffold(
modifier = Modifier.fillMaxSize(),
scaffoldState = scaffoldState,
Expand All @@ -296,6 +292,11 @@ private fun AccuracyDetailScaffold(
sentenceDetails = sentenceDetails,
playerState = playerState,
expanded = expanded,
modifier = if (expanded) {
Modifier.heightIn(max = expandedSheetMaxHeight)
} else {
Modifier
},
)
},
sheetDragHandle = null,
Expand All @@ -306,11 +307,12 @@ private fun AccuracyDetailScaffold(
.fillMaxSize()
.padding(innerPadding),
) {
AccuracyDetailTopAppBar(onClose = onClose)
if (!expanded) {
AccuracyDetailTopAppBar(onClose = onClose)
}
PrezelTabs(
tabs = tabLabels,
pagerState = pagerState,
size = PrezelTabSize.SMALL,
onClickTab = onClickTab,
)
ScriptDetailList(
Expand All @@ -323,8 +325,8 @@ private fun AccuracyDetailScaffold(
}

private const val SEEK_SYNC_THRESHOLD_MILLIS = 750L
private val AccuracyDetailPlayerSheetDefaultPeekHeight = 220.dp
private val AccuracyDetailPlayerSheetLargePeekHeight = 336.dp
private val AccuracyDetailPlayerSheetPeekHeight = 252.dp
private val AccuracyDetailExpandedSheetTopGap = 56.dp

@BasicPreview
@Composable
Expand Down
Loading