-
-
Notifications
You must be signed in to change notification settings - Fork 677
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrate onboarding flow to View Model and Activity Results (#1995)
* DiscoveryView now on viewmodels! * Migrate to OnboardingViewModel * ManualSetup now on viewmodels! * Auth view now on view model. * Flow working but no persisting.... yet! * Functional manual onboarding. * Fix clicking on actual discovered instance. * Fix discovery not authing Fix logout causing issues. * Fix firebase token issues Theme is less hard to see for switch * Cleanup DiscoveryFragment.kt to keep crashes from crashing. * ktlint * Fix minimal build. * Really fix minimal build. * Fix issue with device name being broken. * Make sure location toggle stays active when selected.
- Loading branch information
Showing
40 changed files
with
828 additions
and
1,032 deletions.
There are no files selected for viewing
14 changes: 14 additions & 0 deletions
14
app/src/full/java/io/homeassistant/companion/android/onboarding/MessagingToken.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,14 @@ | ||
package io.homeassistant.companion.android.onboarding | ||
|
||
import android.util.Log | ||
import com.google.firebase.messaging.FirebaseMessaging | ||
import kotlinx.coroutines.tasks.await | ||
|
||
suspend fun getMessagingToken(): String { | ||
return try { | ||
FirebaseMessaging.getInstance().token.await() | ||
} catch (e: Exception) { | ||
Log.e("MessagingToken", "Issue getting token", e) | ||
"" | ||
} | ||
} |
30 changes: 0 additions & 30 deletions
30
...meassistant/companion/android/onboarding/integration/MobileAppIntegrationPresenterImpl.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
36 changes: 0 additions & 36 deletions
36
app/src/main/java/io/homeassistant/companion/android/onboarding/OnboardingFragmentFactory.kt
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.