Skip to content

Commit

Permalink
Merge pull request #10 from taetae98coding/develop
Browse files Browse the repository at this point in the history
1.3.3
  • Loading branch information
taetae98coding authored Dec 31, 2024
2 parents 824b532 + 0396765 commit e50ad1a
Show file tree
Hide file tree
Showing 144 changed files with 3,249 additions and 2,393 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ jobs:
matrix:
command: [
'./gradlew jvmTest',
'./gradlew testReleaseUnitTest',
'./gradlew testRealReleaseUnitTest',
]
steps:
- name: Checkout repository
Expand Down
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@

All notable changes to this project will be documented in this file.

## [unreleased]

### 🐛 Bug Fixes

- Ios - push notification when app foreground
- LoginScreen, JoinScreen Button WindowInset
- Ios holiday

## [1.3.2] - 2024-12-18

### 🚀 Features
Expand Down
8 changes: 4 additions & 4 deletions Diary/Diary.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.3.2;
MARKETING_VERSION = 1.3.3;
PRODUCT_BUNDLE_IDENTIFIER = io.github.taetae98coding.diary.debug;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand Down Expand Up @@ -388,7 +388,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.3.2;
MARKETING_VERSION = 1.3.3;
PRODUCT_BUNDLE_IDENTIFIER = io.github.taetae98coding.diary;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand Down Expand Up @@ -490,7 +490,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.3.2;
MARKETING_VERSION = 1.3.3;
PRODUCT_BUNDLE_IDENTIFIER = io.github.taetae98coding.diary.dev.debug;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand Down Expand Up @@ -584,7 +584,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.3.2;
MARKETING_VERSION = 1.3.3;
PRODUCT_BUNDLE_IDENTIFIER = io.github.taetae98coding.diary.dev;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand Down
6 changes: 4 additions & 2 deletions Diary/Diary/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,13 @@ class AppDelegate: NSObject, UIApplicationDelegate {
}

extension AppDelegate: UNUserNotificationCenterDelegate {

func userNotificationCenter(_ center: UNUserNotificationCenter, willPresent notification: UNNotification, withCompletionHandler completionHandler: @escaping (UNNotificationPresentationOptions) -> Void) {
completionHandler([.list, .banner])
}
}

extension AppDelegate: MessagingDelegate {
func messaging(_ messaging: Messaging, didReceiveRegistrationToken fcmToken: String?) {
print("Firebase registration token: \(String(describing: fcmToken))")

}
}
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
package io.github.taetae98coding.diary.core.compose.memo

import androidx.compose.foundation.layout.RowScope
import androidx.compose.material3.IconButton
import androidx.compose.material3.adaptive.ExperimentalMaterial3AdaptiveApi
import androidx.compose.material3.adaptive.currentWindowAdaptiveInfo
import androidx.compose.material3.adaptive.layout.AnimatedPane
import androidx.compose.material3.adaptive.layout.ListDetailPaneScaffold
import androidx.compose.material3.adaptive.layout.ThreePaneScaffoldRole
import androidx.compose.material3.adaptive.layout.calculatePaneScaffoldDirective
import androidx.compose.material3.adaptive.navigation.ThreePaneScaffoldNavigator
import androidx.compose.material3.adaptive.navigation.rememberListDetailPaneScaffoldNavigator
import androidx.compose.runtime.Composable
Expand All @@ -16,65 +12,82 @@ import androidx.compose.ui.unit.dp
import io.github.taetae98coding.diary.core.compose.adaptive.isListVisible
import io.github.taetae98coding.diary.core.compose.back.KBackHandler
import io.github.taetae98coding.diary.core.compose.memo.detail.MemoDetailScaffold
import io.github.taetae98coding.diary.core.compose.memo.detail.MemoDetailScaffoldState
import io.github.taetae98coding.diary.core.compose.memo.detail.MemoDetailScaffoldActions
import io.github.taetae98coding.diary.core.compose.memo.detail.MemoDetailScaffoldActionsUiState
import io.github.taetae98coding.diary.core.compose.memo.detail.MemoDetailScaffoldNavigationIcon
import io.github.taetae98coding.diary.core.compose.memo.detail.MemoDetailScaffoldUiState
import io.github.taetae98coding.diary.core.compose.memo.detail.rememberMemoDetailScaffoldDetailState
import io.github.taetae98coding.diary.core.compose.memo.tag.MemoTagNavigationIcon
import io.github.taetae98coding.diary.core.compose.memo.tag.MemoTagScaffold
import io.github.taetae98coding.diary.core.compose.tag.card.TagCardItemUiState
import io.github.taetae98coding.diary.core.design.system.icon.NavigateUpIcon
import io.github.taetae98coding.diary.core.compose.tag.card.TagCardUiState
import io.github.taetae98coding.diary.core.model.memo.MemoDetail

@OptIn(ExperimentalMaterial3AdaptiveApi::class)
@Composable
public fun MemoDetailMultiPaneScaffold(
onNavigateUp: () -> Unit,
onDetailTag: (String) -> Unit,
detailScaffoldStateProvider: () -> MemoDetailScaffoldState,
detailUiStateProvider: () -> MemoDetailScaffoldUiState,
detailTagListProvider: () -> List<TagCardItemUiState>?,
detailTitle: @Composable () -> Unit,
onTagAdd: () -> Unit,
tagListProvider: () -> List<TagCardItemUiState>?,
navigateUp: () -> Unit,
navigateToTagAdd: () -> Unit,
navigateToTagDetail: (String) -> Unit,
detailProvider: () -> MemoDetail?,
uiStateProvider: () -> MemoDetailScaffoldUiState.Detail,
detailActionsUiStateProvider: () -> MemoDetailScaffoldActionsUiState,
primaryTagUiStateProvider: () -> TagCardUiState,
tagUiStateProvider: () -> TagCardUiState,
modifier: Modifier = Modifier,
detailActions: @Composable RowScope.() -> Unit = {},
detailFloatingActionButton: @Composable () -> Unit = {},
) {
val windowAdaptiveInfo = currentWindowAdaptiveInfo()
val navigator = rememberListDetailPaneScaffoldNavigator(scaffoldDirective = calculatePaneScaffoldDirective(windowAdaptiveInfo))
val navigator = rememberListDetailPaneScaffoldNavigator()

ListDetailPaneScaffold(
directive = navigator.scaffoldDirective.copy(defaultPanePreferredWidth = 500.dp),
value = navigator.scaffoldValue,
listPane = {
AnimatedPane {
val state = rememberMemoDetailScaffoldDetailState(
onDelete = navigateUp,
onUpdate = navigateUp,
detailProvider = detailProvider,
)

MemoDetailScaffold(
state = state,
uiStateProvider = uiStateProvider,
primaryTagUiStateProvider = primaryTagUiStateProvider,
onTagTitle = { navigator.navigateTo(ThreePaneScaffoldRole.Primary) },
onTag = onDetailTag,
state = detailScaffoldStateProvider(),
uiStateProvider = detailUiStateProvider,
tagListProvider = detailTagListProvider,
title = detailTitle,
navigationIcon = {
IconButton(onClick = onNavigateUp) {
NavigateUpIcon()
}
onTag = navigateToTagDetail,
titleProvider = { detailProvider()?.title },
navigationIconProvider = {
MemoDetailScaffoldNavigationIcon.NavigateUp(
navigateUp = {
uiStateProvider().update(state.detail)
},
)
},
actionsProvider = {
val uiState = detailActionsUiStateProvider()

MemoDetailScaffoldActions.FinishAndDelete(
isFinish = uiState.isFinish,
finish = uiState.finish,
restart = uiState.restart,
delete = uiState.delete,
)
},
actions = detailActions,
floatingActionButton = detailFloatingActionButton,
)
}
},
detailPane = {
AnimatedPane {
MemoTagScaffold(
onTagAdd = onTagAdd,
onTagAdd = navigateToTagAdd,
navigationIcon = {
if (!navigator.isListVisible()) {
IconButton(onClick = navigator::navigateBack) {
NavigateUpIcon()
}
MemoTagNavigationIcon.NavigateUp(navigateUp)
} else {
MemoTagNavigationIcon.None
}
},
primaryTagListProvider = detailTagListProvider,
tagListProvider = tagListProvider,
primaryTagUiStateProvider = primaryTagUiStateProvider,
tagUiStateProvider = tagUiStateProvider,
)
}
},
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
package io.github.taetae98coding.diary.core.compose.memo.add

import androidx.compose.material3.adaptive.ExperimentalMaterial3AdaptiveApi
import androidx.compose.material3.adaptive.layout.AnimatedPane
import androidx.compose.material3.adaptive.layout.ListDetailPaneScaffold
import androidx.compose.material3.adaptive.layout.ThreePaneScaffoldRole
import androidx.compose.material3.adaptive.navigation.rememberListDetailPaneScaffoldNavigator
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.unit.dp
import io.github.taetae98coding.diary.core.compose.adaptive.isListVisible
import io.github.taetae98coding.diary.core.compose.memo.detail.MemoDetailScaffold
import io.github.taetae98coding.diary.core.compose.memo.detail.MemoDetailScaffoldFloatingButton
import io.github.taetae98coding.diary.core.compose.memo.detail.MemoDetailScaffoldNavigationIcon
import io.github.taetae98coding.diary.core.compose.memo.detail.MemoDetailScaffoldUiState
import io.github.taetae98coding.diary.core.compose.memo.tag.MemoTagNavigationIcon
import io.github.taetae98coding.diary.core.compose.memo.tag.MemoTagScaffold
import io.github.taetae98coding.diary.core.compose.tag.card.TagCardUiState
import kotlinx.datetime.LocalDate

@OptIn(ExperimentalMaterial3AdaptiveApi::class)
@Composable
public fun MemoAddMultiPaneScaffold(
navigateUp: () -> Unit,
navigateToTagAdd: () -> Unit,
navigateToTagDetail: (String) -> Unit,
initialAddDateRange: ClosedRange<LocalDate>?,
detailUiStateProvider: () -> MemoDetailScaffoldUiState.Add,
primaryTagUiStateProvider: () -> TagCardUiState,
tagUiStateProvider: () -> TagCardUiState,
modifier: Modifier = Modifier,
) {
val navigator = rememberListDetailPaneScaffoldNavigator()

ListDetailPaneScaffold(
directive = navigator.scaffoldDirective.copy(defaultPanePreferredWidth = 500.dp),
value = navigator.scaffoldValue,
listPane = {
val state = rememberMemoDetailScaffoldAddState(initialDateRange = initialAddDateRange)

AnimatedPane {
MemoDetailScaffold(
state = state,
uiStateProvider = detailUiStateProvider,
primaryTagUiStateProvider = primaryTagUiStateProvider,
onTagTitle = { navigator.navigateTo(ThreePaneScaffoldRole.Primary) },
onTag = navigateToTagDetail,
titleProvider = { "메모 추가" },
navigationIconProvider = { MemoDetailScaffoldNavigationIcon.NavigateUp(navigateUp) },
floatingButtonProvider = {
val uiState = detailUiStateProvider()

MemoDetailScaffoldFloatingButton.Add(
isInProgress = uiState.isAddInProgress,
add = { uiState.add(state.detail) },
)
},
)
}
},
detailPane = {
AnimatedPane {
MemoTagScaffold(
onTagAdd = navigateToTagAdd,
primaryTagUiStateProvider = primaryTagUiStateProvider,
tagUiStateProvider = tagUiStateProvider,
navigationIcon = {
if (navigator.isListVisible()) {
MemoTagNavigationIcon.None
} else {
MemoTagNavigationIcon.NavigateUp(navigator::navigateBack)
}
},
)
}
},
modifier = modifier,
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,11 @@ import kotlinx.datetime.LocalDate

@Composable
public fun rememberMemoDetailScaffoldAddState(
initialStart: LocalDate?,
initialEndInclusive: LocalDate?,
initialDateRange: ClosedRange<LocalDate>?,
): MemoDetailScaffoldState.Add {
val coroutineScope = rememberCoroutineScope()
val componentState = rememberDiaryComponentState()
val dateState =
rememberDiaryDateState(
initialStart = initialStart,
initialEndInclusive = initialEndInclusive,
)
val dateState = rememberDiaryDateState(initialDateRange = initialDateRange)
val colorState = rememberDiaryColorState()

return remember {
Expand Down
Loading

0 comments on commit e50ad1a

Please sign in to comment.