forked from github/szkolny
[APIv2/Debug] Add debug button for marking all announcements as read
This commit is contained in:
parent
ca10ee2fe5
commit
28e0f3487c
@ -45,6 +45,7 @@ import pl.szczodrzynski.edziennik.BuildConfig;
|
||||
import pl.szczodrzynski.edziennik.MainActivity;
|
||||
import pl.szczodrzynski.edziennik.R;
|
||||
import pl.szczodrzynski.edziennik.api.v2.ApiService;
|
||||
import pl.szczodrzynski.edziennik.api.v2.events.requests.AnnouncementsReadRequest;
|
||||
import pl.szczodrzynski.edziennik.api.v2.events.requests.SyncProfileRequest;
|
||||
import pl.szczodrzynski.edziennik.data.db.modules.grades.GradeFull;
|
||||
import pl.szczodrzynski.edziennik.data.db.modules.lessons.LessonFull;
|
||||
@ -148,6 +149,11 @@ public class HomeFragment extends Fragment {
|
||||
EventBus.getDefault().postSticky(new SyncProfileRequest(app.profile.getId(), list));
|
||||
}));
|
||||
|
||||
b.test5.setVisibility(BuildConfig.DEBUG ? View.VISIBLE : View.GONE);
|
||||
b.test5.setOnClickListener((v -> {
|
||||
EventBus.getDefault().postSticky(new AnnouncementsReadRequest(app.profile.getId()));
|
||||
}));
|
||||
|
||||
//((TextView)v.findViewById(R.id.nextSync)).setText(getString(R.string.next_sync_format,Time.fromMillis(app.appJobs.syncJobTime).getStringHMS()));
|
||||
|
||||
|
||||
|
@ -64,7 +64,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="8dp"
|
||||
android:text="Sync profile 16 - view home"
|
||||
android:text="Sync profile - view home"
|
||||
android:visibility="gone"/>
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
@ -73,7 +73,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="8dp"
|
||||
android:text="Sync profile 16 - view messages sent"
|
||||
android:text="Sync profile - view messages sent"
|
||||
android:visibility="gone"/>
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
@ -82,7 +82,16 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="8dp"
|
||||
android:text="Sync profile 16 - view grades"
|
||||
android:text="Sync profile - view grades"
|
||||
android:visibility="gone"/>
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/test5"
|
||||
style="@style/Widget.MaterialComponents.Button"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="8dp"
|
||||
android:text="Mark all announcements as read"
|
||||
android:visibility="gone"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
Loading…
Reference in New Issue
Block a user