Skip to content

Commit 809032d

Browse files
committed
Fixed import issue.
Fixed data population issue
1 parent ec69be9 commit 809032d

File tree

3 files changed

+10
-11
lines changed

3 files changed

+10
-11
lines changed

app/src/main/AndroidManifest.xml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
33
xmlns:tools="http://schemas.android.com/tools">
4-
<uses-permission android:name="android.permission.INTERNET"/>
4+
5+
<uses-permission android:name="android.permission.INTERNET" />
56

67
<application
7-
android:allowBackup="true"
8+
android:name="ytemplate.android.YTemplate"
9+
android:allowBackup="false"
810
android:dataExtractionRules="@xml/data_extraction_rules"
911
android:fullBackupContent="@xml/backup_rules"
1012
android:icon="@mipmap/ic_launcher"
1113
android:label="@string/app_name"
1214
android:roundIcon="@mipmap/ic_launcher_round"
1315
android:supportsRtl="true"
14-
android:name="ytemplate.android.YTemplate"
1516
android:theme="@style/Theme.YTemplate"
1617
tools:targetApi="31">
1718
<activity
@@ -24,9 +25,6 @@
2425
<category android:name="android.intent.category.LAUNCHER" />
2526
</intent-filter>
2627

27-
<meta-data
28-
android:name="android.app.lib_name"
29-
android:value="" />
3028
</activity>
3129
</application>
3230

app/src/main/java/ytemplate/android/data/datasource/RemotePostDataSource.kt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
package ytemplate.android.data.datasource
22

3-
4-
import io.ktor.client.*
5-
import io.ktor.client.call.*
6-
import io.ktor.client.request.*
3+
import io.ktor.client.HttpClient
4+
import io.ktor.client.call.body
5+
import io.ktor.client.request.get
6+
import io.ktor.client.request.url
7+
import javax.inject.Inject
78
import ytemplate.android.data.model.PostDTO
89
import ytemplate.android.data.model.PostRequest
910
import ytemplate.android.infra.AppResult
1011
import ytemplate.android.infra.Routes
11-
import javax.inject.Inject
1212

1313
/**
1414
* RemotePostDataSource will take care all post related remote operation.

app/src/main/java/ytemplate/android/ui/mymodel/MyModelScreen.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ fun MyModelScreen(viewModel: MyPostViewModel = hiltViewModel()) {
4343
key2 = viewModel,
4444
producer = {
4545
lifecycle.repeatOnLifecycle(state = Lifecycle.State.STARTED) {
46+
viewModel.getAllPost()
4647
viewModel.uiState.collect {
4748
value = it
4849
}

0 commit comments

Comments
 (0)