-
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
1 parent
ea5d93f
commit 2fe8a93
Showing
22 changed files
with
127 additions
and
51 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
Binary file modified
BIN
+814 Bytes
(100%)
iosApp/iosApp.xcworkspace/xcuserdata/moka.xcuserdatad/UserInterfaceState.xcuserstate
Binary file not shown.
34 changes: 34 additions & 0 deletions
34
shared/src/androidMain/kotlin/land/moka/kmm/shared/base/BaseFragment.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,34 @@ | ||
package land.moka.kmm.shared.base | ||
|
||
import android.os.Bundle | ||
import android.view.LayoutInflater | ||
import android.view.View | ||
import android.view.ViewGroup | ||
import androidx.fragment.app.Fragment | ||
import land.moka.kmm.shared.lib.log.Log | ||
|
||
open class BaseFragment : Fragment() { | ||
|
||
private val TAG = javaClass.simpleName | ||
|
||
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? { | ||
Log.print("$TAG onCreateView is called 🐳") | ||
return super.onCreateView(inflater, container, savedInstanceState) | ||
} | ||
|
||
override fun onResume() { | ||
super.onResume() | ||
Log.print("$TAG onResume is called 🐳") | ||
} | ||
|
||
override fun onStop() { | ||
super.onStop() | ||
Log.print("$TAG onStop is called 🐳") | ||
} | ||
|
||
override fun onDestroyView() { | ||
super.onDestroyView() | ||
Log.print("$TAG onDestroyView is called 🐳") | ||
} | ||
|
||
} |
20 changes: 20 additions & 0 deletions
20
shared/src/androidMain/kotlin/land/moka/kmm/shared/base/BaseScopedActivity.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,20 @@ | ||
package land.moka.kmm.shared.base | ||
|
||
import android.os.Bundle | ||
import androidx.fragment.app.FragmentActivity | ||
import land.moka.kmm.shared.di.AppContainer | ||
import land.moka.kmm.shared.di.scope.index.BaseScope | ||
|
||
open class BaseScopedActivity(var container: AppContainer, var scope: BaseScope) : FragmentActivity() { | ||
|
||
override fun onCreate(savedInstanceState: Bundle?) { | ||
scope.create(container) | ||
super.onCreate(savedInstanceState) | ||
} | ||
|
||
override fun onDestroy() { | ||
scope.destroy(container) | ||
super.onDestroy() | ||
} | ||
|
||
} |
22 changes: 22 additions & 0 deletions
22
shared/src/androidMain/kotlin/land/moka/kmm/shared/base/BaseScopedFragment.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,22 @@ | ||
package land.moka.kmm.shared.base | ||
|
||
import android.os.Bundle | ||
import android.view.LayoutInflater | ||
import android.view.View | ||
import android.view.ViewGroup | ||
import land.moka.kmm.shared.di.AppContainer | ||
import land.moka.kmm.shared.di.scope.index.BaseScope | ||
|
||
open class BaseScopedFragment(var container: AppContainer, var scope: BaseScope) : BaseFragment() { | ||
|
||
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? { | ||
scope.create(this.container) | ||
return super.onCreateView(inflater, container, savedInstanceState) | ||
} | ||
|
||
override fun onDestroyView() { | ||
scope.destroy(this.container) | ||
super.onDestroyView() | ||
} | ||
|
||
} |
2 changes: 1 addition & 1 deletion
2
...kmm/shared/lib/util/AppContextProvider.kt → ...moka/kmm/shared/lib/AppContextProvider.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
File renamed without changes.
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
11 changes: 11 additions & 0 deletions
11
shared/src/commonMain/kotlin/land/moka/kmm/shared/di/scope/index/BaseScope.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,11 @@ | ||
package land.moka.kmm.shared.di.scope.index | ||
|
||
import land.moka.kmm.shared.di.AppContainer | ||
|
||
interface BaseScope { | ||
|
||
fun create(container: AppContainer) | ||
|
||
fun destroy(container: AppContainer) | ||
|
||
} |
11 changes: 0 additions & 11 deletions
11
shared/src/commonMain/kotlin/land/moka/kmm/shared/di/scope/index/Scope.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
2 changes: 1 addition & 1 deletion
2
.../shared/app/network/MainLoopDispatcher.kt → ...moka/kmm/shared/lib/MainLoopDispatcher.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