Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@ android {
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"

javaCompileOptions {
annotationProcessorOptions {
arguments = ["room.schemaLocation": "$projectDir/schemas".toString()]
}
}
}
buildTypes {
release {
Expand Down
3 changes: 2 additions & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:usesCleartextTraffic="true"
android:theme="@style/AppTheme"
tools:ignore="GoogleAppIndexingWarning">
<activity android:name=".ui.MainActivity">
Expand All @@ -25,4 +26,4 @@
</activity>
</application>

</manifest>
</manifest>
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,11 @@ interface CurrentWeatherDao {
@Insert(onConflict = OnConflictStrategy.REPLACE)
fun upsert(weatherEntry: CurrentWeatherEntry)

@SuppressWarnings(RoomWarnings.CURSOR_MISMATCH)
@Query("select * from current_weather where id = $CURRENT_WEATHER_ID")
fun getWeatherMetric(): LiveData<MetricCurrentWeatherEntry>

@SuppressWarnings(RoomWarnings.CURSOR_MISMATCH)
@Query("select * from current_weather where id = $CURRENT_WEATHER_ID")
fun getWeatherImperial(): LiveData<ImperialCurrentWeatherEntry>
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ class MainActivity : AppCompatActivity(), KodeinAware {
}

override fun onSupportNavigateUp(): Boolean {
return NavigationUI.navigateUp(null, navController)
return NavigationUI.navigateUp(navController,null)
}

private fun requestLocationPermission() {
Expand Down