diff --git a/app/build.gradle.kts b/app/build.gradle.kts
index 42df43a..5b7b425 100644
--- a/app/build.gradle.kts
+++ b/app/build.gradle.kts
@@ -47,7 +47,7 @@ android {
minSdk = 26
targetSdk = 34
versionCode = 11011
- versionName = "1.1.1"
+ versionName = "1.1.2"
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables {
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index c076d67..e6b9efa 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -61,6 +61,17 @@
+
+
+
+
+
+
+
+
+
+
+
>() {
- lateinit var pagingSource: GetCommentsPageSource
+ private lateinit var pagingSource: GetCommentsPageSource
override fun fetch(arguments: Arguments): Flow> {
return Pager(
config = PagingConfig(
@@ -36,11 +36,15 @@ class GetCommentsRepository @Inject constructor(
}.flow
}
- override fun closeResources() {
- super.closeResources()
+ fun invalidateSource() {
if (::pagingSource.isInitialized)
pagingSource.invalidate()
}
+
+ override fun closeResources() {
+ super.closeResources()
+ this.invalidateSource()
+ }
}
class GetCommentsPageSource @Inject constructor(
diff --git a/app/src/main/java/com/no5ing/bbibbi/data/repository/post/GetFeedsRepository.kt b/app/src/main/java/com/no5ing/bbibbi/data/repository/post/GetFeedsRepository.kt
index 4383fca..ae7058d 100644
--- a/app/src/main/java/com/no5ing/bbibbi/data/repository/post/GetFeedsRepository.kt
+++ b/app/src/main/java/com/no5ing/bbibbi/data/repository/post/GetFeedsRepository.kt
@@ -23,7 +23,7 @@ import javax.inject.Singleton
class GetFeedsRepository @Inject constructor(
private val memberCacheProvider: MemberCacheProvider,
) : BaseRepository>() {
- lateinit var pagingSource: GetFeedPageSource
+ private lateinit var pagingSource: GetFeedPageSource
override fun fetch(arguments: Arguments): Flow> {
return Pager(
config = PagingConfig(
@@ -37,11 +37,15 @@ class GetFeedsRepository @Inject constructor(
}.flow
}
- override fun closeResources() {
- super.closeResources()
+ fun invalidateSource() {
if (::pagingSource.isInitialized)
pagingSource.invalidate()
}
+
+ override fun closeResources() {
+ super.closeResources()
+ this.invalidateSource()
+ }
}
class GetFeedPageSource @Inject constructor(
diff --git a/app/src/main/java/com/no5ing/bbibbi/di/NetworkModule.kt b/app/src/main/java/com/no5ing/bbibbi/di/NetworkModule.kt
index b6f70bb..e92339f 100644
--- a/app/src/main/java/com/no5ing/bbibbi/di/NetworkModule.kt
+++ b/app/src/main/java/com/no5ing/bbibbi/di/NetworkModule.kt
@@ -32,9 +32,9 @@ import javax.inject.Singleton
@Module
@InstallIn(SingletonComponent::class)
object NetworkModule {
- private const val timeout_read = 10L
- private const val timeout_connect = 10L
- private const val timeout_write = 10L
+ private const val timeout_read = 20L
+ private const val timeout_connect = 20L
+ private const val timeout_write = 20L
val requireUpdateState = MutableStateFlow(false)
val requireTokenInvalidRestart = MutableStateFlow(false)
@@ -144,7 +144,6 @@ object NetworkModule {
// HttpLoggingInterceptor { message -> Timber.d("%s", message) }
// httpLoggingInterceptor.level = HttpLoggingInterceptor.Level.BODY
return client
- // .addInterceptor(httpLoggingInterceptor)
.connectTimeout(timeout_connect, TimeUnit.SECONDS)
.readTimeout(timeout_read, TimeUnit.SECONDS)
.writeTimeout(timeout_write, TimeUnit.SECONDS)
diff --git a/app/src/main/java/com/no5ing/bbibbi/presentation/feature/uistate/family/MainFeedStoryElementUiState.kt b/app/src/main/java/com/no5ing/bbibbi/presentation/feature/uistate/family/MainFeedStoryElementUiState.kt
new file mode 100644
index 0000000..cfd2b53
--- /dev/null
+++ b/app/src/main/java/com/no5ing/bbibbi/presentation/feature/uistate/family/MainFeedStoryElementUiState.kt
@@ -0,0 +1,9 @@
+package com.no5ing.bbibbi.presentation.feature.uistate.family
+
+import com.no5ing.bbibbi.data.model.BaseModel
+import com.no5ing.bbibbi.data.model.member.Member
+
+data class MainFeedStoryElementUiState(
+ val member: Member,
+ val isUploadedToday: Boolean,
+) : BaseModel()
diff --git a/app/src/main/java/com/no5ing/bbibbi/presentation/feature/view/common/CustomAlertDialog.kt b/app/src/main/java/com/no5ing/bbibbi/presentation/feature/view/common/CustomAlertDialog.kt
index 0296d43..bf9c200 100644
--- a/app/src/main/java/com/no5ing/bbibbi/presentation/feature/view/common/CustomAlertDialog.kt
+++ b/app/src/main/java/com/no5ing/bbibbi/presentation/feature/view/common/CustomAlertDialog.kt
@@ -9,6 +9,7 @@ import androidx.compose.foundation.layout.size
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.material3.AlertDialog
import androidx.compose.material3.AlertDialogDefaults
+import androidx.compose.material3.BasicAlertDialog
import androidx.compose.material3.Button
import androidx.compose.material3.ButtonDefaults
import androidx.compose.material3.ExperimentalMaterial3Api
@@ -60,7 +61,7 @@ fun CustomAlertDialog(
hasCancel: Boolean = true,
) {
if (enabledState.value) {
- AlertDialog(
+ BasicAlertDialog(
onDismissRequest = cancelRequest,
modifier = Modifier,
properties = DialogProperties()
diff --git a/app/src/main/java/com/no5ing/bbibbi/presentation/feature/view/common/PostCommentDialog.kt b/app/src/main/java/com/no5ing/bbibbi/presentation/feature/view/common/PostCommentDialog.kt
index b2f5a97..f38c232 100644
--- a/app/src/main/java/com/no5ing/bbibbi/presentation/feature/view/common/PostCommentDialog.kt
+++ b/app/src/main/java/com/no5ing/bbibbi/presentation/feature/view/common/PostCommentDialog.kt
@@ -25,8 +25,8 @@ import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.foundation.text.BasicTextField
import androidx.compose.foundation.text.KeyboardActions
import androidx.compose.foundation.text.KeyboardOptions
-import androidx.compose.material3.Divider
import androidx.compose.material3.ExperimentalMaterial3Api
+import androidx.compose.material3.HorizontalDivider
import androidx.compose.material3.Icon
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Text
@@ -217,7 +217,10 @@ fun PostCommentDialog(
style = MaterialTheme.bbibbiTypo.bodyOneBold,
)
Spacer(modifier = Modifier.height(16.dp))
- Divider(thickness = 1.dp, color = MaterialTheme.bbibbiScheme.gray600)
+ HorizontalDivider(
+ thickness = 1.dp,
+ color = MaterialTheme.bbibbiScheme.gray600
+ )
}
}
) {
diff --git a/app/src/main/java/com/no5ing/bbibbi/presentation/feature/view/landing/join_family_with_link/JoinFamilyWithLinkPage.kt b/app/src/main/java/com/no5ing/bbibbi/presentation/feature/view/landing/join_family_with_link/JoinFamilyWithLinkPage.kt
index 005ca99..6689a51 100644
--- a/app/src/main/java/com/no5ing/bbibbi/presentation/feature/view/landing/join_family_with_link/JoinFamilyWithLinkPage.kt
+++ b/app/src/main/java/com/no5ing/bbibbi/presentation/feature/view/landing/join_family_with_link/JoinFamilyWithLinkPage.kt
@@ -238,6 +238,6 @@ fun JoinFamilyWithLinkPage(
}
private fun isValidUrl(input: String): Boolean {
- val linkPrefix = "https://no5ing.kr/o/"
- return input.startsWith(linkPrefix)
+ return input.startsWith("https://no5ing.kr/o/")
+ || input.startsWith("https://bibbi.app/o/")
}
\ No newline at end of file
diff --git a/app/src/main/java/com/no5ing/bbibbi/presentation/feature/view/main/family/FamilyPage.kt b/app/src/main/java/com/no5ing/bbibbi/presentation/feature/view/main/family/FamilyPage.kt
index b3c2b7c..4e079ed 100644
--- a/app/src/main/java/com/no5ing/bbibbi/presentation/feature/view/main/family/FamilyPage.kt
+++ b/app/src/main/java/com/no5ing/bbibbi/presentation/feature/view/main/family/FamilyPage.kt
@@ -4,7 +4,7 @@ import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
-import androidx.compose.material3.Divider
+import androidx.compose.material3.HorizontalDivider
import androidx.compose.material3.MaterialTheme
import androidx.compose.runtime.Composable
import androidx.compose.runtime.LaunchedEffect
@@ -77,7 +77,10 @@ fun FamilyPage(
onTapShare = onTapShare,
uiState = inviteLinkState,
)
- Divider(thickness = 1.dp, color = MaterialTheme.bbibbiScheme.backgroundSecondary)
+ HorizontalDivider(
+ thickness = 1.dp,
+ color = MaterialTheme.bbibbiScheme.backgroundSecondary
+ )
FamilyPageMemberList(
meId = meId,
meState = meState,
@@ -110,7 +113,10 @@ fun FamilyPagePreview() {
mutableStateOf(APIResponse.success(DeepLink.mock()))
},
)
- Divider(thickness = 1.dp, color = MaterialTheme.bbibbiScheme.backgroundSecondary)
+ HorizontalDivider(
+ thickness = 1.dp,
+ color = MaterialTheme.bbibbiScheme.backgroundSecondary
+ )
FamilyPageMemberList(
meId = Member.unknown().memberId,
meState = remember { mutableStateOf(APIResponse.success(Member.unknown())) },
diff --git a/app/src/main/java/com/no5ing/bbibbi/presentation/feature/view/main/home/HomePage.kt b/app/src/main/java/com/no5ing/bbibbi/presentation/feature/view/main/home/HomePage.kt
index 2e3444c..b713cc5 100644
--- a/app/src/main/java/com/no5ing/bbibbi/presentation/feature/view/main/home/HomePage.kt
+++ b/app/src/main/java/com/no5ing/bbibbi/presentation/feature/view/main/home/HomePage.kt
@@ -28,7 +28,6 @@ import com.no5ing.bbibbi.presentation.component.BBiBBiSurface
import com.no5ing.bbibbi.presentation.component.BackToExitHandler
import com.no5ing.bbibbi.presentation.feature.view.common.CustomAlertDialog
import com.no5ing.bbibbi.presentation.feature.view_model.auth.RetrieveMeViewModel
-import com.no5ing.bbibbi.presentation.feature.view_model.members.FamilyMembersViewModel
import com.no5ing.bbibbi.presentation.feature.view_model.post.DailyFamilyTopViewModel
import com.no5ing.bbibbi.presentation.feature.view_model.post.IsMeUploadedTodayViewModel
import com.no5ing.bbibbi.presentation.feature.view_model.post.MainPostFeedViewModel
@@ -43,7 +42,6 @@ fun HomePage(
retrieveMeViewModel: RetrieveMeViewModel = hiltViewModel(),
isMeUploadedTodayViewModel: IsMeUploadedTodayViewModel = hiltViewModel(),
familyPostsViewModel: MainPostFeedViewModel = hiltViewModel(),
- familyMembersViewModel: FamilyMembersViewModel = hiltViewModel(),
familyPostTopViewModel: DailyFamilyTopViewModel = hiltViewModel(),
onTapLeft: () -> Unit = {},
onTapRight: () -> Unit = {},
@@ -81,7 +79,7 @@ fun HomePage(
}
if (familyPostsViewModel.isInitialize()) {
- familyMembersViewModel.invoke(Arguments())
+ // familyMembersViewModel.invoke(Arguments())
retrieveMeViewModel.invoke(Arguments())
familyPostTopViewModel.invoke(Arguments())// TODO
familyPostsViewModel.invoke(
@@ -114,7 +112,6 @@ fun HomePage(
)
HomePageContent(
contentState = familyPostsViewModel.uiState,
- familyListState = familyMembersViewModel.uiState,
postTopState = familyPostTopViewModel.uiState,
meState = retrieveMeViewModel.uiState,
onTapContent = onTapContent,
@@ -152,8 +149,7 @@ fun HomePagePreview() {
HomePageTopBar()
HomePageContent(
contentState = MutableStateFlow(PagingData.empty()),
- familyListState = MutableStateFlow(PagingData.empty()),
- postTopState = MutableStateFlow(emptyMap()),
+ postTopState = MutableStateFlow(APIResponse.idle()),
meState = MutableStateFlow(APIResponse.success(Member.unknown()))
)
}
diff --git a/app/src/main/java/com/no5ing/bbibbi/presentation/feature/view/main/home/HomePageContent.kt b/app/src/main/java/com/no5ing/bbibbi/presentation/feature/view/main/home/HomePageContent.kt
index 326a0ae..643d50b 100644
--- a/app/src/main/java/com/no5ing/bbibbi/presentation/feature/view/main/home/HomePageContent.kt
+++ b/app/src/main/java/com/no5ing/bbibbi/presentation/feature/view/main/home/HomePageContent.kt
@@ -10,7 +10,7 @@ import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.lazy.grid.GridItemSpan
-import androidx.compose.material3.Divider
+import androidx.compose.material3.HorizontalDivider
import androidx.compose.material3.MaterialTheme
import androidx.compose.runtime.Composable
import androidx.compose.runtime.LaunchedEffect
@@ -30,6 +30,7 @@ import com.no5ing.bbibbi.R
import com.no5ing.bbibbi.data.model.APIResponse
import com.no5ing.bbibbi.data.model.member.Member
import com.no5ing.bbibbi.data.model.post.Post
+import com.no5ing.bbibbi.presentation.feature.uistate.family.MainFeedStoryElementUiState
import com.no5ing.bbibbi.presentation.feature.uistate.family.MainFeedUiState
import com.no5ing.bbibbi.presentation.theme.bbibbiScheme
import com.no5ing.bbibbi.util.gapBetweenNow
@@ -39,8 +40,8 @@ import kotlinx.coroutines.flow.StateFlow
@Composable
fun HomePageContent(
contentState: StateFlow>,
- familyListState: StateFlow>,
- postTopState: StateFlow