Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove logo bar #29

Merged
merged 3 commits into from
May 9, 2024
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
4 changes: 2 additions & 2 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ android {
applicationId = "org.mozilla.tiktokreporter"
minSdk = 26
targetSdk = 34
versionCode = 2
versionName = "0.0.2"
versionCode = 3
versionName = "0.0.3"

testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,19 +141,7 @@ private fun AppPolicyScreenContent(
}
}

MozillaScaffold(modifier = modifier, topBar = if (isForOnboarding) null else {
{
MozillaTopAppBar(modifier = Modifier.fillMaxWidth(), navItem = {
IconButton(
onClick = onNavigateBack
) {
Icon(
imageVector = Icons.Default.ArrowBack, contentDescription = "", tint = MozillaColor.TextColor
)
}
})
}
}) { innerPadding ->
MozillaScaffold(modifier = modifier) { innerPadding ->

Column(
modifier = Modifier
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,21 @@ fun MozillaScaffold(
topBar: (@Composable () -> Unit)? = null,
content: @Composable (PaddingValues) -> Unit,
) {
Scaffold(
modifier = modifier,
topBar = topBar ?: {
MozillaTopAppBar(
modifier = Modifier.fillMaxWidth()
)
},
containerColor = MozillaColor.Background,
contentColor = MozillaColor.TextColor,
content = content
)
if (topBar != null) {
Scaffold(
modifier = modifier,
topBar = topBar,
containerColor = MozillaColor.Background,
contentColor = MozillaColor.TextColor,
content = content
)
} else {
Scaffold(
modifier = modifier,
containerColor = MozillaColor.Background,
contentColor = MozillaColor.TextColor,
content = content
)
}

}
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
package org.mozilla.tiktokreporter.ui.components

import androidx.compose.foundation.Image
import androidx.compose.foundation.layout.BoxWithConstraints
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.width
import androidx.compose.material3.ExperimentalMaterial3Api
import androidx.compose.material3.Text
import androidx.compose.material3.TopAppBar
import androidx.compose.material3.TopAppBarDefaults
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.tooling.preview.Preview
import org.mozilla.tiktokreporter.R
import org.mozilla.tiktokreporter.ui.theme.MozillaColor
import org.mozilla.tiktokreporter.ui.theme.TikTokReporterTheme

Expand All @@ -29,18 +26,12 @@ fun MozillaTopAppBar(
titleContentColor = MozillaColor.TextColor,
actionIconContentColor = MozillaColor.TextColor
)
BoxWithConstraints(
Box(
modifier = modifier
) {
TopAppBar(
title = {
Image(
modifier = Modifier.width(maxWidth.div(2)),
painter = painterResource(
id = R.drawable.fyp_reporter_logo_fyp_reporter_primary_outlined_black
),
contentDescription = null
)
Text(text="")
},
modifier = Modifier.fillMaxWidth(),
navigationIcon = navItem,
Expand Down
93 changes: 0 additions & 93 deletions app/src/main/res/drawable/tt_reporter_logo_01_black.xml

This file was deleted.

87 changes: 0 additions & 87 deletions app/src/main/res/drawable/tt_reporter_logo_01_white.xml

This file was deleted.

Loading