Skip to content

Commit d6cb921

Browse files
authored
Merge pull request #111 from Code-Kotliners-Inc/create-screen-icons
create screen fix 2
2 parents 0e4361f + 4250d2a commit d6cb921

3 files changed

Lines changed: 8 additions & 21 deletions

File tree

app/src/main/java/com/codekotliners/memify/core/theme/Type.kt

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import androidx.compose.ui.graphics.Color
77
import androidx.compose.ui.text.TextStyle
88
import androidx.compose.ui.text.font.Font
99
import androidx.compose.ui.text.font.FontFamily
10-
import androidx.compose.ui.text.font.FontStyle
1110
import androidx.compose.ui.text.font.FontWeight
1211
import androidx.compose.ui.text.style.TextDecoration
1312
import androidx.compose.ui.unit.sp
@@ -71,18 +70,5 @@ val Typography.askPassword: TextStyle
7170
color = MaterialTheme.colorScheme.onBackground,
7271
)
7372

74-
val Typography.ubuntuText16Sp: TextStyle
75-
@Composable
76-
get() =
77-
TextStyle(
78-
fontFamily = FontFamily(Font(R.font.ubunturegular)),
79-
fontSize = 16.sp,
80-
fontStyle = FontStyle.Normal,
81-
)
82-
val MaterialIcons =
83-
FontFamily(
84-
Font(R.font.material_icons_regular),
85-
)
86-
8773
val FontFamilyImpact: FontFamily
8874
get() = FontFamily(Font(R.font.impact))

app/src/main/java/com/codekotliners/memify/features/create/presentation/ui/CreateScreen.kt

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ import com.codekotliners.memify.features.create.presentation.viewmodel.CanvasVie
8383
import com.codekotliners.memify.features.templates.presentation.ui.TemplatesFeedScreen
8484
import com.codekotliners.memify.features.templates.presentation.ui.components.ErrorLoadingItem
8585
import com.codekotliners.memify.features.viewer.presentation.viewmodel.ImageViewerViewModel
86+
import kotlinx.coroutines.delay
8687
import kotlinx.coroutines.launch
8788

8889
@OptIn(ExperimentalMaterial3Api::class)
@@ -199,19 +200,19 @@ private fun CreateScreenBottomSheet(
199200
topBar = {
200201
CreateScreenTopBar(
201202
onMenuClick = {
202-
if (scale == 1f) {
203-
coroutineScope.launch {
204-
showImageViewer.value = true
205-
val bitmapCompose = graphicsLayer.toImageBitmap()
203+
coroutineScope.launch {
204+
scale = 1f
205+
showImageViewer.value = true
206+
delay(350)
207+
val bitmapCompose = graphicsLayer.toImageBitmap()
208+
if (scale == 1f) {
206209
bitmapState.value = bitmapCompose
207210

208211
val state = bitmapState.value
209212
if (state != null) {
210213
viewModelViewer.setBitmapOnly(state.asAndroidBitmap())
211214
}
212215
}
213-
} else {
214-
scale = 1f
215216
}
216217
},
217218
onShareClick = { viewModelViewer.onShareClick() },

app/src/main/res/values/strings.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@
7878
<string name="publish_meme">Опубликовать</string>
7979
<string name="link_account_hint">link vk account</string>
8080
<string name="change_photo_hint">change photo</string>
81-
<string name="name_blank">MemeMaker2011</string>
81+
<string name="name_blank">Unknown</string>
8282

8383
<string name="description_swipe_bottom_sheet">Свайп</string>
8484
<string name="choose_pattern">Выбрать шаблон</string>

0 commit comments

Comments
 (0)