Skip to content

Commit

Permalink
Merge pull request #485 from BCSDLab/releases/v4.0.9
Browse files Browse the repository at this point in the history
Update v4.0.9
  • Loading branch information
wateralsie authored Nov 27, 2024
2 parents d5f77d1 + 4536dca commit 6f4d733
Show file tree
Hide file tree
Showing 66 changed files with 2,171 additions and 395 deletions.
4 changes: 2 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ buildscript {
}

extra.apply {
set("versionName", "4.0.7")
set("versionCode", 40007)
set("versionName", "4.0.9")
set("versionCode", 40009)
// 코인 버전 관리

set("versionBusinessName", "1.0.1")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.width
import androidx.compose.foundation.layout.wrapContentHeight
import androidx.compose.foundation.layout.wrapContentWidth
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.material3.SnackbarDuration
import androidx.compose.material3.SnackbarHost
Expand All @@ -22,6 +20,7 @@ import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.clip
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.text.TextStyle
import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.Dp
import androidx.compose.ui.unit.dp
Expand All @@ -32,35 +31,46 @@ import `in`.koreatech.koin.core.designsystem.theme.KoinTheme
@Composable
fun CustomSnackBarHost(
hotState: SnackbarHostState,
radius: Dp = 0.dp,
messageTextStyle: TextStyle = KoinTheme.typography.regular12.copy(
color = Color.White
modifier: Modifier = Modifier,
radius: Dp = 6.dp,

messageTextStyle: TextStyle =KoinTheme.typography.regular14.copy(
color = KoinTheme.colors.neutral0
),
actionLabelTextStyle: TextStyle = KoinTheme.typography.regular12.copy(
color = Color.White
actionLabelTextStyle: TextStyle = KoinTheme.typography.regular14.copy(
color = KoinTheme.colors.sub500
),
background: Color = Color.Black,
background: Color = KoinTheme.colors.primary700,
alignment: Alignment = Alignment.BottomCenter,
paddingValues: PaddingValues = PaddingValues(bottom = 20.dp, start = 10.dp, end = 10.dp),
innerPaddingValues: PaddingValues = PaddingValues(horizontal = 10.dp, vertical = 16.dp)
innerPaddingValues: PaddingValues = PaddingValues(horizontal = 16.dp, vertical = 20.dp),
onAction: (() -> Unit)? = null
) {
SnackbarHost(
hostState = hotState,
) { snackbarData ->
SnackBarContent(
messageText = snackbarData.visuals.message,
actionLabelText = snackbarData.visuals.actionLabel ?: "",
radius = radius,
background = background,
messageTextStyle = messageTextStyle,
actionLabelTextStyle = actionLabelTextStyle,
alignment = alignment,
paddingValues = paddingValues,
innerPaddingValues = innerPaddingValues,
onAction = { snackbarData.dismiss() }
)
}
Box(
modifier = modifier
.fillMaxSize()
.padding(paddingValues),
contentAlignment = alignment
) {
SnackbarHost(
hostState = hotState,
) { snackbarData ->
SnackBarContent(
messageText = snackbarData.visuals.message,
actionLabelText = snackbarData.visuals.actionLabel ?: "",
radius = radius,
background = background,
messageTextStyle = messageTextStyle,
actionLabelTextStyle = actionLabelTextStyle,
innerPaddingValues = innerPaddingValues,
onAction = {
onAction?.invoke()
snackbarData.dismiss()
}
)
}

}
}

@Composable
Expand All @@ -76,42 +86,35 @@ private fun SnackBarContent(
actionLabelTextStyle: TextStyle = KoinTheme.typography.regular12.copy(
color = Color.White
),
alignment: Alignment = Alignment.BottomCenter,
paddingValues: PaddingValues = PaddingValues(bottom = 20.dp, start = 10.dp, end = 10.dp),
innerPaddingValues: PaddingValues = PaddingValues(horizontal = 10.dp, vertical = 16.dp),
onAction: () -> Unit = {}
) {
Box(
modifier = modifier
.fillMaxSize()
.padding(paddingValues),
contentAlignment = alignment
.fillMaxWidth()
.clip(RoundedCornerShape(radius))
.background(background)
.padding(innerPaddingValues)
) {
Box(
modifier = modifier
.fillMaxWidth()
.clip(RoundedCornerShape(radius))
.background(background)
.padding(innerPaddingValues)
Row(
verticalAlignment = Alignment.CenterVertically,
) {
Row(
verticalAlignment = Alignment.CenterVertically,
) {
Spacer(modifier = Modifier.width(4.dp))
Spacer(modifier = Modifier.width(4.dp))
Text(
text = messageText,
style = messageTextStyle,
modifier = Modifier.weight(1f),
)
Spacer(modifier = Modifier.weight(0.05f))
if (actionLabelText.isNotEmpty()) {
Text(
text = messageText,
style = messageTextStyle,
modifier = Modifier.weight(1f),
modifier = Modifier
.weight(0.2f)
.noRippleClickable { onAction() },
text = actionLabelText,
style = actionLabelTextStyle,
textAlign = TextAlign.End
)
Spacer(modifier = Modifier.weight(0.05f))
if (actionLabelText.isNotEmpty()) {
Text(
text = actionLabelText,
style = actionLabelTextStyle,
modifier = Modifier.weight(0.1f).noRippleClickable { onAction() }
)
}

}
}
}
Expand Down Expand Up @@ -143,4 +146,4 @@ private fun SnackBarContentPreview() {
messageText = "스낵바 메시지",
actionLabelText = "닫기",
)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ enum class Experiment(

BENEFIT_STORE("Benefit", ExperimentGroup.A, ExperimentGroup.B),
DINING_SHARE("campus_share_v1", ExperimentGroup.SHARE_ORIGINAL, ExperimentGroup.SHARE_NEW),
MAIN_DINING_SEE_MORE("c_main_dining_v1", ExperimentGroup.MAIN_DINING_ORIGINAL, ExperimentGroup.MAIN_DINING_NEW);
MAIN_DINING_SEE_MORE("c_main_dining_v1", ExperimentGroup.MAIN_DINING_ORIGINAL, ExperimentGroup.MAIN_DINING_NEW),
MAIN_ARTICLE_KEYWORD_BANNER("c_keyword_ banner_v1", ExperimentGroup.MAIN_BANNER_ORIGINAL, ExperimentGroup.MAIN_BANNER_NEW);

init {
require(experimentGroups.isNotEmpty()) { "Experiment should have at least one group" }
Expand All @@ -23,4 +24,7 @@ object ExperimentGroup {

const val MAIN_DINING_ORIGINAL = "main_dining_original"
const val MAIN_DINING_NEW = "main_dining_new"

const val MAIN_BANNER_ORIGINAL = "banner_original"
const val MAIN_BANNER_NEW = "banner_new"
}
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,17 @@ object EventLogger {
logEvent(action, EventCategory.SWIPE, label, value, *extras)
}

/**
* 푸시알림 접속 이벤트 로깅
* @param action: 이벤트 발생 도메인(BUSINESS, CAMPUS, USER)
* @param label: 이벤트 소분류
* @param value: 이벤트 값
* @param extras: 추가 이벤트 값
*/
fun logNotificationEvent(action: EventAction, label: String, value: String, vararg extras: EventExtra) {
logEvent(action, EventCategory.NOTIFICATION, label, value, *extras)
}

/**
* @param action: 커스텀 이벤트 발생(EventAction 이외에 action)
* @param category: 커스텀 이벤트 종류(EventCategory 이외에 category)
Expand Down Expand Up @@ -107,7 +118,8 @@ enum class EventAction(val value: String) {
enum class EventCategory(val value: String) {
CLICK("click"),
SCROLL("scroll"),
SWIPE("swipe") // 하단 뒤로가기(아이폰의 swipe 뒤로가기와 대응)
SWIPE("swipe"), // 하단 뒤로가기(아이폰의 swipe 뒤로가기와 대응)
NOTIFICATION("notification")
}

data class EventExtra(val key: String, val value: String)
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,8 @@ object AnalyticsConstant {

const val CAMPUS_DINING_1 = "CAMPUS_dining_1"
const val CAMPUS_NOTICE_1 = "CAMPUS_notice_1"
const val POPULAR_NOTICE_BANNER = "popular_notice_banner"
const val TO_MANAGE_KEYWORD = "to_manage_keyword"
}

const val PREVIOUS_PAGE = "previous_page"
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions core/src/main/res/values/colors.xml
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@
<color name="primary_100">#CFF1F9</color>
<!-- Sub -->
<color name="sub_sub500">#F7941E</color>
<color name="sub_sub600">#D47415</color>
<!-- Neutral -->
<color name="neutral_800">#000000</color>
<color name="neutral_700">#1F1F1F</color>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,9 @@ interface TimetableAuthApi {
): TimetableFrameResponse

@DELETE("/v2/timetables/frame")
suspend fun deleteTimetableFrame()
suspend fun deleteTimetableFrame(
@Query("id") frameId: Int
): Response<Unit>

@GET("/v2/timetables/frames")
suspend fun getTimetableFrames(
Expand All @@ -71,5 +73,7 @@ interface TimetableAuthApi {
): Response<Unit>

@DELETE("/v2/all/timetables/frame")
suspend fun deleteAllTimetableFrame()
suspend fun deleteAllTimetableFrame(
@Query("semester") semester: String,
): Response<Unit>
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,6 @@ const val BUS_REQUEST_TIME_FORMAT = "HH:mm"

const val STORE_OPEN_TIME_FORMAT = "HH:mm"
const val STORE_CLOSE_TIME_FORMAT = "HH:mm"
const val STORE_UPDATED_DATE_TIME_FORMAT = "yyyy-MM-dd HH:mm:ss" // 2018-03-23 20:25:24
const val STORE_UPDATED_DATE_TIME_FORMAT = "yyyy-MM-dd HH:mm:ss" // 2018-03-23 20:25:24

const val WEEK_IN_MILLIS = 7 * 24 * 60 * 60 * 1000L
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ import `in`.koreatech.koin.data.source.local.ArticleLocalDataSource
import `in`.koreatech.koin.data.source.remote.ArticleRemoteDataSource
import `in`.koreatech.koin.domain.model.article.Article
import `in`.koreatech.koin.domain.model.article.ArticleHeader
import `in`.koreatech.koin.domain.model.article.ArticleNoti
import `in`.koreatech.koin.domain.model.article.ArticlePagination
import `in`.koreatech.koin.domain.model.article.articleNotiContent
import `in`.koreatech.koin.domain.model.user.User
import `in`.koreatech.koin.domain.repository.ArticleRepository
import `in`.koreatech.koin.domain.repository.UserRepository
Expand Down Expand Up @@ -149,6 +151,18 @@ class ArticleRepositoryImpl @Inject constructor(
}
}

override fun fetchKeywordNotiIndex(): Flow<Int> {
return flow {
emit(articleLocalDataSource.fetchKeywordNotiIndex())
}
}

override fun saveKeywordNotiIndex(): Flow<Unit> {
return flow {
emit(articleLocalDataSource.saveKeywordNotiIndex())
}
}

override fun fetchSearchedArticles(
query: String,
boardId: Int,
Expand Down
Loading

0 comments on commit 6f4d733

Please sign in to comment.