-
-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #115 from michaelbel/develop
1.4.5
- Loading branch information
Showing
146 changed files
with
2,480 additions
and
321 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
25 changes: 25 additions & 0 deletions
25
core/common/src/main/kotlin/org/michaelbel/movies/common/browser/Browser.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,25 @@ | ||
package org.michaelbel.movies.common.browser | ||
|
||
import android.content.Intent | ||
import androidx.activity.compose.ManagedActivityResultLauncher | ||
import androidx.activity.result.ActivityResult | ||
import androidx.browser.customtabs.CustomTabColorSchemeParams | ||
import androidx.browser.customtabs.CustomTabsIntent | ||
import androidx.core.net.toUri | ||
|
||
fun openUrl( | ||
resultContract: ManagedActivityResultLauncher<Intent, ActivityResult>, | ||
toolbarColor: Int, | ||
url: String | ||
) { | ||
val colorSchemeParams: CustomTabColorSchemeParams = CustomTabColorSchemeParams.Builder() | ||
.setToolbarColor(toolbarColor) | ||
.build() | ||
val customTabsIntentBuilder: CustomTabsIntent.Builder = CustomTabsIntent.Builder().apply { | ||
setDefaultColorSchemeParams(colorSchemeParams) | ||
} | ||
val customTabsIntent: CustomTabsIntent = customTabsIntentBuilder.build().apply { | ||
intent.data = url.toUri() | ||
} | ||
resultContract.launch(customTabsIntent.intent) | ||
} |
4 changes: 2 additions & 2 deletions
4
...es/settings/ktx/NotificationManagerKtx.kt → ...vies/common/ktx/NotificationManagerKtx.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,8 +1,8 @@ | ||
package org.michaelbel.movies.settings.ktx | ||
package org.michaelbel.movies.common.ktx | ||
|
||
import android.app.NotificationManager | ||
import android.content.Context | ||
import androidx.core.content.ContextCompat | ||
|
||
internal val Context.notificationManager: NotificationManager | ||
val Context.notificationManager: NotificationManager | ||
get() = ContextCompat.getSystemService(this, NotificationManager::class.java) as NotificationManager |
2 changes: 1 addition & 1 deletion
2
...movies/details/ktx/SavedStateHandleKtx.kt → .../movies/common/ktx/SavedStateHandleKtx.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
2 changes: 1 addition & 1 deletion
2
core/common/src/main/kotlin/org/michaelbel/movies/common/localization/LocaleController.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
2 changes: 1 addition & 1 deletion
2
...uage/exceptions/InvalidLocaleException.kt → ...tion/exceptions/InvalidLocaleException.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,3 +1,3 @@ | ||
package org.michaelbel.movies.ui.language.exceptions | ||
package org.michaelbel.movies.common.localization.exceptions | ||
|
||
internal object InvalidLocaleException: Exception("Invalid locale") |
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
8 changes: 5 additions & 3 deletions
8
...l/movies/ui/language/model/AppLanguage.kt → .../common/localization/model/AppLanguage.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
8 changes: 5 additions & 3 deletions
8
...haelbel/movies/ui/theme/model/AppTheme.kt → ...ichaelbel/movies/common/theme/AppTheme.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
2 changes: 1 addition & 1 deletion
2
...theme/exceptions/InvalidThemeException.kt → ...theme/exceptions/InvalidThemeException.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,3 +1,3 @@ | ||
package org.michaelbel.movies.ui.theme.exceptions | ||
package org.michaelbel.movies.common.theme.exceptions | ||
|
||
internal object InvalidThemeException: Exception("Invalid theme") |
2 changes: 1 addition & 1 deletion
2
...elbel/movies/ui/version/AppVersionData.kt → ...l/movies/common/version/AppVersionData.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
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
24 changes: 24 additions & 0 deletions
24
core/domain/src/main/kotlin/org/michaelbel/movies/domain/data/dao/AccountDao.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,24 @@ | ||
package org.michaelbel.movies.domain.data.dao | ||
|
||
import androidx.room.Dao | ||
import androidx.room.Insert | ||
import androidx.room.OnConflictStrategy | ||
import androidx.room.Query | ||
import kotlinx.coroutines.flow.Flow | ||
import org.michaelbel.movies.domain.data.entity.AccountDb | ||
|
||
/** | ||
* The Data Access Object for the [AccountDb] class. | ||
*/ | ||
@Dao | ||
interface AccountDao { | ||
|
||
@Query("SELECT * FROM accounts WHERE id = :accountId") | ||
fun accountById(accountId: Int): Flow<AccountDb?> | ||
|
||
@Insert(onConflict = OnConflictStrategy.REPLACE) | ||
suspend fun insert(account: AccountDb) | ||
|
||
@Query("DELETE FROM accounts WHERE id = :accountId") | ||
suspend fun removeById(accountId: Int) | ||
} |
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.