Skip to content

Commit bfd94d7

Browse files
committed
feat: remove widget title
1 parent af526a8 commit bfd94d7

3 files changed

Lines changed: 0 additions & 32 deletions

File tree

app/src/main/java/to/bitkit/ui/screens/wallets/HomeScreen.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -784,7 +784,6 @@ private fun Widgets(
784784
WidgetType.PRICE -> {
785785
homeUiState.currentPrice?.run {
786786
PriceCard(
787-
showWidgetTitle = homeUiState.showWidgetTitles,
788787
pricePreferences = homeUiState.pricePreferences,
789788
priceDTO = homeUiState.currentPrice,
790789
modifier = Modifier

app/src/main/java/to/bitkit/ui/screens/widgets/price/PriceCard.kt

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ import androidx.compose.foundation.layout.fillMaxSize
1111
import androidx.compose.foundation.layout.fillMaxWidth
1212
import androidx.compose.foundation.layout.height
1313
import androidx.compose.foundation.layout.padding
14-
import androidx.compose.foundation.layout.size
15-
import androidx.compose.material3.Icon
1614
import androidx.compose.material3.MaterialTheme
1715
import androidx.compose.material3.ShapeDefaults
1816
import androidx.compose.material3.Text
@@ -21,10 +19,8 @@ import androidx.compose.runtime.remember
2119
import androidx.compose.ui.Alignment
2220
import androidx.compose.ui.Modifier
2321
import androidx.compose.ui.draw.clip
24-
import androidx.compose.ui.graphics.Color
2522
import androidx.compose.ui.graphics.SolidColor
2623
import androidx.compose.ui.platform.testTag
27-
import androidx.compose.ui.res.painterResource
2824
import androidx.compose.ui.res.stringResource
2925
import androidx.compose.ui.text.font.FontWeight
3026
import androidx.compose.ui.tooling.preview.Preview
@@ -45,7 +41,6 @@ import to.bitkit.data.dto.price.PriceDTO
4541
import to.bitkit.data.dto.price.PriceWidgetData
4642
import to.bitkit.data.dto.price.TradingPair
4743
import to.bitkit.models.widget.PricePreferences
48-
import to.bitkit.ui.components.BodyMSB
4944
import to.bitkit.ui.components.Caption13Up
5045
import to.bitkit.ui.components.CaptionB
5146
import to.bitkit.ui.components.HorizontalSpacer
@@ -56,7 +51,6 @@ import to.bitkit.ui.theme.Colors
5651
@Composable
5752
fun PriceCard(
5853
modifier: Modifier = Modifier,
59-
showWidgetTitle: Boolean,
6054
pricePreferences: PricePreferences,
6155
priceDTO: PriceDTO,
6256
) {
@@ -76,29 +70,6 @@ fun PriceCard(
7670
.fillMaxWidth()
7771
.padding(16.dp)
7872
) {
79-
if (showWidgetTitle) {
80-
Row(
81-
verticalAlignment = Alignment.CenterVertically,
82-
modifier = Modifier
83-
.padding(bottom = 8.dp)
84-
.testTag("price_card_widget_title_row")
85-
) {
86-
Icon(
87-
painter = painterResource(R.drawable.widget_chart_line),
88-
contentDescription = null,
89-
tint = Color.Unspecified,
90-
modifier = Modifier
91-
.size(32.dp)
92-
.testTag("price_card_widget_title_icon")
93-
)
94-
HorizontalSpacer(16.dp)
95-
BodyMSB(
96-
text = stringResource(R.string.widgets__price__name),
97-
modifier = Modifier.testTag("price_card_widget_title_text")
98-
)
99-
}
100-
}
101-
10273
Row(
10374
verticalAlignment = Alignment.CenterVertically,
10475
modifier = Modifier
@@ -304,7 +275,6 @@ private fun FullBlockCardPreview() {
304275
.padding(16.dp)
305276
) {
306277
PriceCard(
307-
showWidgetTitle = true,
308278
pricePreferences = PricePreferences(
309279
showSource = true,
310280
),

app/src/main/java/to/bitkit/ui/screens/widgets/price/PricePreviewScreen.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,6 @@ private fun WidgetCarousel(
223223
)
224224

225225
PAGE_WIDE -> PriceCard(
226-
showWidgetTitle = false,
227226
pricePreferences = pricePreferences,
228227
priceDTO = priceDTO,
229228
modifier = Modifier

0 commit comments

Comments
 (0)