-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Dual-Platform unified Lifecycle Observer
- Loading branch information
Showing
8 changed files
with
158 additions
and
43 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
35 changes: 35 additions & 0 deletions
35
shared/src/commonMain/kotlin/com/yuroyami/syncplay/ui/LifecycleWatchdog.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,35 @@ | ||
package com.yuroyami.syncplay.ui | ||
|
||
interface LifecycleWatchdog { | ||
|
||
/** | ||
* Called when the component is visible and interactive. | ||
* @author Equivalent to viewDidAppear on iOS. | ||
*/ | ||
fun onResume() | ||
|
||
/** | ||
* Called when the component is no longer visible. | ||
* @author Equivalent to viewDidDisappear on iOS. | ||
*/ | ||
fun onStop() | ||
|
||
/** | ||
* Called when the component is first created. | ||
* @author Equivalent to viewDidLoad on iOS. | ||
*/ | ||
fun onCreate() | ||
|
||
/** | ||
* Called when the component is becoming visible. | ||
* @author Equivalent to viewWillAppear on iOS. | ||
*/ | ||
fun onStart() | ||
|
||
/** | ||
* Called when the component is no longer visible but still partially visible. | ||
* @author Equivalent to viewWillDisappear on iOS. | ||
*/ | ||
fun onPause() | ||
|
||
} |
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