-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
74 additions
and
6 deletions.
There are no files selected for viewing
16 changes: 15 additions & 1 deletion
16
data/src/main/java/com/nexters/boolti/data/datasource/PopupDataSource.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,11 +1,25 @@ | ||
package com.nexters.boolti.data.datasource | ||
|
||
import android.content.Context | ||
import androidx.datastore.core.DataStore | ||
import androidx.datastore.preferences.core.Preferences | ||
import androidx.datastore.preferences.preferencesDataStore | ||
import com.nexters.boolti.data.network.api.PopupService | ||
import com.nexters.boolti.data.network.response.PopupResponse | ||
import javax.inject.Inject | ||
|
||
internal class PopupDataSource @Inject constructor( | ||
private val service: PopupService | ||
private val service: PopupService, | ||
private val context: Context, | ||
) { | ||
// private val dataStore: DataStore<Preferences> by context.pre | ||
|
||
suspend fun getPopup(): PopupResponse = service.getPopup() | ||
suspend fun shouldShowPopup(): Boolean { | ||
return true | ||
} | ||
|
||
suspend fun hidePopupToday() { | ||
|
||
} | ||
} |
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
5 changes: 5 additions & 0 deletions
5
presentation/src/main/java/com/nexters/boolti/presentation/screen/show/ShowEvent.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,5 +1,10 @@ | ||
package com.nexters.boolti.presentation.screen.show | ||
|
||
import com.nexters.boolti.domain.model.Popup | ||
|
||
sealed interface ShowEvent { | ||
data object Search : ShowEvent | ||
data class ShowPopup( | ||
val popup: Popup | ||
) : ShowEvent | ||
} |
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