-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[refactor/remove-rxjava] RxJava -> Kotlin Coroutines로 로직 리팩토링 (#338)
* [remove-rxjava] User 쪽 rxjava 사용처 없애기 * [remove-rxjava] NoticePagingSource에서 rxjava 사용처 없애기 * [remove-rxjava] EditSubscription쪽 코루틴 적용 * [remove-rxjava] Notice쪽 rxjava 제거 * [remove-rxjava] Push 쪽 코루틴 적용 * [remove-rxjava] 필요없는 코드 삭제(data:push) * [remove-rxjava] Delete RxJava Completely * Update Test * fix: 테스트 fail 이슈 수정 --------- Co-authored-by: Wooyoung Myung <[email protected]>
- Loading branch information
Showing
57 changed files
with
462 additions
and
759 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 0 additions & 30 deletions
30
core/testUtil/src/main/java/com/ku_stacks/ku_ring/testutil/SchedulersTestRule.kt
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 10 additions & 8 deletions
18
data/local/src/main/java/com/ku_stacks/ku_ring/local/room/PushDao.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,30 @@ | ||
package com.ku_stacks.ku_ring.local.room | ||
|
||
import androidx.room.* | ||
import androidx.room.Dao | ||
import androidx.room.Insert | ||
import androidx.room.OnConflictStrategy | ||
import androidx.room.Query | ||
import com.ku_stacks.ku_ring.local.entity.PushEntity | ||
import io.reactivex.rxjava3.core.Completable | ||
import io.reactivex.rxjava3.core.Flowable | ||
import kotlinx.coroutines.flow.Flow | ||
|
||
@Dao | ||
interface PushDao { | ||
@Insert(onConflict = OnConflictStrategy.REPLACE) | ||
suspend fun insertNotification(pushEntity: PushEntity) | ||
|
||
@Query("UPDATE PushEntity SET isNew = :value WHERE articleId = :articleId and isNew = not :value") | ||
fun updateNotificationAsOld(articleId: String, value: Boolean): Completable | ||
suspend fun updateNotificationAsOld(articleId: String, value: Boolean) | ||
|
||
@Query("SELECT * FROM PushEntity ORDER BY postedDate DESC, receivedDate DESC") | ||
fun getNotificationList(): Flowable<List<PushEntity>> | ||
fun getNotificationList(): Flow<List<PushEntity>> | ||
|
||
@Query("SELECT COUNT(articleId) FROM PushEntity WHERE isNew = :value") | ||
fun getNotificationCount(value: Boolean): Flowable<Int> | ||
fun getNotificationCount(value: Boolean): Flow<Int> | ||
|
||
@Query("DELETE FROM PushEntity WHERE articleId = :articleId") | ||
fun deleteNotification(articleId: String): Completable | ||
suspend fun deleteNotification(articleId: String) | ||
|
||
//not using now | ||
@Query("DELETE FROM PushEntity") | ||
fun deleteAllNotification(): Completable | ||
suspend fun deleteAllNotification() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.