-
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.
Browse files
Browse the repository at this point in the history
…aging [Feature/#53] : notification api paging
- Loading branch information
Showing
19 changed files
with
352 additions
and
200 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
7 changes: 7 additions & 0 deletions
7
core/data/src/main/java/com/teamwable/data/repository/NotificationRepository.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,6 +1,13 @@ | ||
package com.teamwable.data.repository | ||
|
||
import androidx.paging.PagingData | ||
import com.teamwable.model.notification.NotificationActionModel | ||
import com.teamwable.model.notification.NotificationInformationModel | ||
import kotlinx.coroutines.flow.Flow | ||
|
||
interface NotificationRepository { | ||
suspend fun getNumber(): Result<Int> | ||
suspend fun patchCheck(): Result<Boolean> | ||
fun getNotifications(): Flow<PagingData<NotificationActionModel>> | ||
fun getInformation(): Flow<PagingData<NotificationInformationModel>> | ||
} |
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
3 changes: 2 additions & 1 deletion
3
...ble/model/NotificationInformationModel.kt → ...ification/NotificationInformationModel.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,7 +1,8 @@ | ||
package com.teamwable.model | ||
package com.teamwable.model.notification | ||
|
||
data class NotificationInformationModel( | ||
val infoNotificationType: String, | ||
val time: String, | ||
val imageUrl: String, | ||
val infoNotificationId: Long, | ||
) |
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
18 changes: 7 additions & 11 deletions
18
...notification/src/main/java/com/teamwable/notification/action/NotificationActionAdapter.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
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
17 changes: 17 additions & 0 deletions
17
...re/notification/src/main/java/com/teamwable/notification/action/NotificationActionType.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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package com.teamwable.notification.action | ||
|
||
import androidx.annotation.StringRes | ||
import com.teamwable.notification.R | ||
|
||
enum class NotificationActionType(@StringRes val title: Int, @StringRes val content: Int) { | ||
CONTENT_LIKED(title = R.string.label_notification_action_content_liked, content = R.string.tv_notification_action_content_liked), | ||
COMMENT(title = R.string.label_notification_action_feed_comment, content = R.string.tv_notification_action_feed_comment), | ||
COMMENT_LIKED(title = R.string.label_notification_action_comment_liked, content = R.string.tv_notification_action_comment_liked), | ||
ACTING_CONTINUE(title = R.string.label_notification_action_acting_continue, content = R.string.tv_notification_action_acting_continue), | ||
BE_GHOST(title = R.string.label_notification_action_be_ghost, content = R.string.tv_notification_action_be_ghost), | ||
CONTENT_GHOST(title = R.string.label_notification_action_content_ghost, content = R.string.tv_notification_action_content_ghost), | ||
COMMENT_GHOST(title = R.string.label_notification_action_comment_ghost, content = R.string.tv_notification_action_comment_ghost), | ||
USER_BAN(title = R.string.label_notification_action_user_ban, content = R.string.tv_notification_action_user_ban), | ||
POPULAR_WRITER(title = R.string.label_notification_action_popular_writer, content = R.string.tv_notification_action_popular_writer), | ||
POPULAR_CONTENT(title = R.string.label_notification_action_popular_content, content = R.string.tv_notification_action_popular_content), | ||
} |
Oops, something went wrong.