Fixed new element bug

This commit is contained in:
Daniele 2021-10-05 07:26:16 +02:00
parent 308474246b
commit 065ef2bea6
4 changed files with 4 additions and 3 deletions

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project version="4"> <project version="4">
<component name="CompilerConfiguration"> <component name="CompilerConfiguration">
<bytecodeTargetLevel target="11" /> <bytecodeTargetLevel target="1.8" />
</component> </component>
</project> </project>

View File

@ -20,5 +20,5 @@
</option> </option>
</component> </component>
<component name="ExternalStorageConfigurationManager" enabled="true" /> <component name="ExternalStorageConfigurationManager" enabled="true" />
<component name="ProjectRootManager" version="2" languageLevel="JDK_11" default="true" project-jdk-name="11" project-jdk-type="JavaSDK" /> <component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="11" project-jdk-type="JavaSDK" />
</project> </project>

View File

@ -107,7 +107,7 @@ public class GeofavoriteRepository {
if (geofav.getId() != 0) { if (geofav.getId() != 0) {
geofavs.remove(geofav); geofavs.remove(geofav);
} }
geofavs.add(geofav); geofavs.add(response.body());
mGeofavorites.postValue(geofavs); mGeofavorites.postValue(geofavs);
mIsUpdating.postValue(false); mIsUpdating.postValue(false);
mOnFinished.postValue(true); mOnFinished.postValue(true);

View File

@ -0,0 +1 @@
Fixed bug when opening newly-created element