Skip to content

Commit

Permalink
Merge pull request #199 from Team-Notitime/fix/198-task-remove
Browse files Browse the repository at this point in the history
remove: task 제거 (#198)
  • Loading branch information
easyhz authored Sep 28, 2024
2 parents 97fd95a + 9c05ff4 commit 5922ae4
Show file tree
Hide file tree
Showing 6 changed files with 73 additions and 9 deletions.
4 changes: 4 additions & 0 deletions .idea/icon.svg
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
@@ -1,6 +1,7 @@
package com.easyhz.noffice.core.design_system.component.topBar

import android.annotation.SuppressLint
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.fillMaxHeight
Expand All @@ -22,6 +23,7 @@ import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.text.style.TextOverflow
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import com.easyhz.noffice.core.design_system.R
import com.easyhz.noffice.core.design_system.component.tab.TabRow
import com.easyhz.noffice.core.design_system.component.tab.TabRowDefaults.tabIndicatorOffset
import com.easyhz.noffice.core.design_system.extension.noRippleClickable
Expand Down Expand Up @@ -113,6 +115,49 @@ fun <T> HomeTopBar(
}
}

@Composable
fun HomeTopBar(
modifier: Modifier = Modifier,
onClickIconMenu: (TopBarIconMenu) -> Unit
) {
Row(
modifier = modifier.padding(top = 8.dp).screenHorizonPadding().fillMaxWidth().height(44.dp),
horizontalArrangement = Arrangement.SpaceBetween
) {
Icon(
painter = painterResource(id = R.drawable.ic_logo_top),
contentDescription = "logo",
tint = Green500
)
Row(
modifier = Modifier
) {
TopBarIconMenu.entries.forEach {
Box(modifier = Modifier
.size(44.dp)
.noRippleClickable {
onClickIconMenu(it)
}) {
Icon(
modifier = Modifier
.align(Alignment.Center)
.size(24.dp),
painter = painterResource(id = it.iconId),
contentDescription = it.label,
tint = Grey500
)
}
}
}
}
}

@Preview(showBackground = true)
@Composable
private fun HomeTopBarPreview() {
HomeTopBar { }
}

@Preview(showBackground = true)
@Composable
private fun TopBarPrev() {
Expand Down
20 changes: 20 additions & 0 deletions core/design-system/src/main/res/drawable/ic_logo_top.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="45dp"
android:height="44dp"
android:viewportWidth="45"
android:viewportHeight="44">
<path
android:pathData="M9,11.334C13.444,12.199 17.037,13.964 19.367,18.088C20.5,20.094 20.986,22.459 20.734,24.748C20.597,25.99 20.226,27.252 19.397,28.187C18.568,29.122 17.21,29.657 16.026,29.258C14.184,28.638 13.62,26.737 13.565,24.972C13.49,22.618 14.003,20.208 14.855,18.021C15.919,15.294 17.668,12.687 20.226,11.165C24.137,8.836 29.276,10.21 32.246,13.42C34.94,16.331 35.083,19.085 35.596,22.87"
android:strokeLineJoin="round"
android:strokeWidth="3.5"
android:fillColor="#00000000"
android:strokeColor="#26D961"
android:strokeLineCap="round"/>
<path
android:pathData="M23.248,30.467C23.248,30.467 24.944,34.877 29.151,33.52C33.357,32.163 33.29,28.703 33.29,28.703"
android:strokeLineJoin="round"
android:strokeWidth="3.5"
android:fillColor="#00000000"
android:strokeColor="#26D961"
android:strokeLineCap="round"/>
</vector>
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ class AnnouncementDetailViewModel @Inject constructor(
private fun fetchData(organizationId: Int, id: Int) = viewModelScope.launch {
val organizationDeferred = async { fetchOrganization(organizationId) }
val announcementDeferred = async { fetchAnnouncement(id) }
fetchAnnouncementTask(id)
// fetchAnnouncementTask(id)
val organizationResult = organizationDeferred.await()
val announcementResult = announcementDeferred.await()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ sealed class OptionData<T> {
return linkedMapOf(
Options.DATE_TIME to DateTime(data = SelectionDateTimeState(), isSelected = false),
Options.PLACE to Place(data = ContactState(), isSelected = false),
Options.TASK to Task(data = emptyList(), isSelected = false),
// Options.TASK to Task(data = emptyList(), isSelected = false),
Options.REMIND to Remind(data = emptyList(), isSelected = false)
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,13 +96,8 @@ fun HomeScreen(
NofficeScaffold(
modifier = modifier,
topBar = {
HomeTopBar(
tabs = enumValues<HomeTopBarMenu>(),
onClickIconMenu = {
viewModel.postIntent(HomeIntent.ClickTopBarIconMenu(it))
}
) {
viewModel.postIntent(HomeIntent.ChangeTopBarMenu(it))
HomeTopBar {
viewModel.postIntent(HomeIntent.ClickTopBarIconMenu(it))
}
}
) { paddingValues ->
Expand Down

0 comments on commit 5922ae4

Please sign in to comment.