Skip to content

Commit

Permalink
Merge branch 'main' into main
Browse files Browse the repository at this point in the history
Signed-off-by: Doener <[email protected]>
  • Loading branch information
sun5066 authored Sep 13, 2024
2 parents f590b64 + eb57c9f commit 3ff52f5
Show file tree
Hide file tree
Showing 11 changed files with 211 additions and 132 deletions.
16 changes: 10 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
<a href='https://play.google.com/store/apps/details?id=com.linky.android'><img alt='Get it on Google Play' src='https://play.google.com/intl/en_us/badges/static/images/badges/en_badge_web_generic.png' height="80"/></a>

https://github.com/Team-Linky/android-client/assets/13445643/cd13fdb5-6122-4d8a-997b-f20327b25faf

# 미리보기

<video width="300" height="666" controls>
<source src="/preview/preview.mp4" type="video/mp4">
</video>

=======

## 링키가 무엇인가요?

링키는
Expand Down Expand Up @@ -28,10 +38,4 @@
- 타임라인, 태그의 데이터는 Jetpack Room에서
- 화면 잠금 여부, 생체 인식 여부, PIN 번호는 Preferences-DataStore에서 관리하고있어요.

# 미리보기

<video width="300" height="666" controls>
<source src="/preview/preview.mp4" type="video/mp4">
</video>

ⓒ 2024 Linky - (강성범, 김예진, 추연학, 김민석)
2 changes: 1 addition & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<application
android:name=".LinkyApplication"
android:allowBackup="true"
android:allowBackup="false"
android:dataExtractionRules="@xml/data_extraction_rules"
android:enableOnBackInvokedCallback="true"
android:fullBackupContent="@xml/backup_rules"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ object VersionConstants {
const val MIN_SDK = 24
const val TARGET_SDK = 34

const val VERSION_CODE = 2
const val VERSION_NAME = "1.0.02"
const val VERSION_CODE = 5
const val VERSION_NAME = "1.0.05"

}
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import com.squareup.moshi.Moshi
LinkTagCrossRef::class,
LinkTagCrossRefBackupEntity::class
],
version = 1
version = 2
)
@TypeConverters(value = [LongTypeListConverter::class, OpenGraphDataConverter::class])
abstract class LinkyDataBase : RoomDatabase() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ interface LinkDao {
suspend fun deleteRemovedAll()

@Transaction
@Query("SELECT * FROM link WHERE isRemove == 0")
@Query("SELECT * FROM link WHERE isRemove == 0 ORDER BY link.createAt DESC")
fun selectPage(): PagingSource<Int, LinkWithTags>

@Query("SELECT * FROM link WHERE pk == :id")
Expand All @@ -51,6 +51,7 @@ interface LinkDao {
)
)
AND isRemove == 0
ORDER BY link.createAt DESC
"""
)
fun selectLinksByTagName(tagName: String): PagingSource<Int, LinkWithTags>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.linky.timeline

import androidx.activity.ComponentActivity
import androidx.compose.animation.AnimatedVisibility
import androidx.compose.animation.fadeIn
import androidx.compose.animation.fadeOut
import androidx.compose.foundation.Image
Expand Down Expand Up @@ -179,16 +180,22 @@ private fun TimeLineScreen(
derivedStateOf { linksPager.loadState.append is LoadState.Loading && linksPager.itemCount > 0 }
}

val showHeader by remember(listState) {
derivedStateOf { listState.firstVisibleItemIndex < 1 }
}

Column(
modifier = Modifier
.fillMaxSize()
.background(MaterialTheme.colors.background),
horizontalAlignment = Alignment.CenterHorizontally
) {
TimeLineHeader(
sortType = sortType,
onChangeSort = onChangeSort,
)
AnimatedVisibility(visible = showHeader) {
TimeLineHeader(
sortType = sortType,
onChangeSort = onChangeSort,
)
}
Box(
modifier = Modifier.weight(1f),
contentAlignment = Alignment.TopCenter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class TimeLineViewModel @Inject constructor(
}
}

init {
private fun getLinks() {
intent {
val links = savedStateHandle.get<String>(INTENT_KEY_TAG_NAME)
?.let { selectLinkByTagNameUseCase.invoke(it) }
Expand All @@ -58,6 +58,10 @@ class TimeLineViewModel @Inject constructor(
reduce { state.copy(links = links.cachedIn(viewModelScope)) }
}
}

init {
getLinks()
}
}

sealed interface TimeLineAction {
Expand Down
Loading

0 comments on commit 3ff52f5

Please sign in to comment.