Skip to content

Commit

Permalink
release 1.2.5
Browse files Browse the repository at this point in the history
fixed mess bug
  • Loading branch information
amangrobo committed Sep 17, 2019
1 parent ce95a45 commit 7abf346
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 17 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ android {
applicationId "com.grobo.notifications"
minSdkVersion 21
targetSdkVersion 29
versionCode 21
versionName "1.2.4"
versionCode 22
versionName "1.2.5"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
Expand Down
17 changes: 4 additions & 13 deletions app/src/main/java/com/grobo/notifications/Mess/MessModel.java
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
package com.grobo.notifications.Mess;

import androidx.annotation.Keep;
import androidx.annotation.NonNull;
import androidx.room.Entity;
import androidx.room.PrimaryKey;

import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;

import java.io.Serializable;
import java.util.List;

@Keep
public class MessModel {

@SerializedName("mess")
Expand All @@ -24,6 +24,7 @@ public void setMess(Mess mess) {
this.mess = mess;
}

@Keep
public class Mess implements Serializable {
@SerializedName("fullday")
@Expose
Expand All @@ -49,9 +50,6 @@ public class Mess implements Serializable {
@SerializedName("messChoice")
@Expose
private Integer messChoice;
@SerializedName("__v")
@Expose
private Integer v;

public List<Long> getBreakfast() {
return breakfast;
Expand Down Expand Up @@ -86,10 +84,6 @@ public Student getStudent() {
return student;
}

public Integer getV() {
return v;
}

public void setBreakfast(List<Long> breakfast) {
this.breakfast = breakfast;
}
Expand Down Expand Up @@ -118,14 +112,11 @@ public void setSnacks(List<Long> snacks) {
this.snacks = snacks;
}

public void setV(Integer v) {
this.v = v;
}

public void setStudent(Student student) {
this.student = student;
}

@Keep
public class Student {

@SerializedName("_id")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
import java.util.Locale;

import static android.app.Activity.RESULT_OK;
import static android.view.View.VISIBLE;
import static com.grobo.notifications.utils.Constants.IS_TT_DOWNLOADED;

public class TimetableFragment extends Fragment {
Expand Down Expand Up @@ -64,7 +65,7 @@ public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceStat
if (prefs.getString("jsonString", "").equals("")) {

timetableAvailable.setVisibility(View.GONE);
timetableNotAvailable.setVisibility(View.VISIBLE);
timetableNotAvailable.setVisibility(VISIBLE);

noTimetableImage = view.findViewById(R.id.no_timetable_image);
FloatingActionButton button = view.findViewById(R.id.change_timetable_fab);
Expand All @@ -89,7 +90,7 @@ public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceStat

} else {

timetableAvailable.setVisibility(View.VISIBLE);
timetableAvailable.setVisibility(VISIBLE);
timetableNotAvailable.setVisibility(View.GONE);

ListView ttListView = view.findViewById(R.id.tt_list_view);
Expand All @@ -106,6 +107,9 @@ public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceStat
ttAdapter.clear();
ttAdapter.addAll(timetableItems);
ttAdapter.notifyDataSetChanged();
} else {
ttListView.setVisibility(View.INVISIBLE);
view.findViewById(R.id.empty_view).setVisibility(VISIBLE);
}
}

Expand Down
5 changes: 5 additions & 0 deletions app/src/main/res/layout/fragment_timetable.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@
android:paddingTop="16dp"
android:paddingEnd="24dp" />

<include
android:id="@+id/empty_view"
android:visibility="invisible"
layout="@layout/item_empty_view" />

</RelativeLayout>

<RelativeLayout
Expand Down

0 comments on commit 7abf346

Please sign in to comment.