forked from github/szkolny
[Structure] Change file names (remove Register before fragment names)
This commit is contained in:
parent
26c801ebee
commit
7d136d9d77
@ -56,20 +56,20 @@ import pl.szczodrzynski.edziennik.ui.modules.messages.MessagesFragment
|
|||||||
import pl.szczodrzynski.edziennik.utils.models.NavTarget
|
import pl.szczodrzynski.edziennik.utils.models.NavTarget
|
||||||
import pl.szczodrzynski.edziennik.network.ServerRequest
|
import pl.szczodrzynski.edziennik.network.ServerRequest
|
||||||
import pl.szczodrzynski.edziennik.sync.SyncJob
|
import pl.szczodrzynski.edziennik.sync.SyncJob
|
||||||
import pl.szczodrzynski.edziennik.ui.modules.agenda.RegisterAgendaDefaultFragment
|
import pl.szczodrzynski.edziennik.ui.modules.agenda.AgendaDefaultFragment
|
||||||
import pl.szczodrzynski.edziennik.ui.modules.announcements.RegisterAnnouncementsFragment
|
import pl.szczodrzynski.edziennik.ui.modules.announcements.AnnouncementsFragment
|
||||||
import pl.szczodrzynski.edziennik.ui.modules.attendance.RegisterAttendancesFragment
|
import pl.szczodrzynski.edziennik.ui.modules.attendance.AttendanceFragment
|
||||||
import pl.szczodrzynski.edziennik.ui.modules.base.DebugFragment
|
import pl.szczodrzynski.edziennik.ui.modules.base.DebugFragment
|
||||||
import pl.szczodrzynski.edziennik.ui.modules.base.FeedbackFragment
|
import pl.szczodrzynski.edziennik.ui.modules.base.FeedbackFragment
|
||||||
import pl.szczodrzynski.edziennik.ui.modules.base.HelpFragment
|
import pl.szczodrzynski.edziennik.ui.modules.base.HelpFragment
|
||||||
import pl.szczodrzynski.edziennik.ui.modules.grades.editor.GradesEditorFragment
|
import pl.szczodrzynski.edziennik.ui.modules.grades.editor.GradesEditorFragment
|
||||||
import pl.szczodrzynski.edziennik.ui.modules.grades.RegisterGradesFragment
|
import pl.szczodrzynski.edziennik.ui.modules.grades.GradesFragment
|
||||||
import pl.szczodrzynski.edziennik.ui.modules.home.HomeFragment
|
import pl.szczodrzynski.edziennik.ui.modules.home.HomeFragment
|
||||||
import pl.szczodrzynski.edziennik.ui.modules.notices.RegisterNoticesFragment
|
import pl.szczodrzynski.edziennik.ui.modules.behaviour.BehaviourFragment
|
||||||
import pl.szczodrzynski.edziennik.ui.modules.notifications.RegisterNotificationsFragment
|
import pl.szczodrzynski.edziennik.ui.modules.notifications.NotificationsFragment
|
||||||
import pl.szczodrzynski.edziennik.ui.modules.settings.ProfileManagerFragment
|
import pl.szczodrzynski.edziennik.ui.modules.settings.ProfileManagerFragment
|
||||||
import pl.szczodrzynski.edziennik.ui.modules.settings.SettingsNewFragment
|
import pl.szczodrzynski.edziennik.ui.modules.settings.SettingsNewFragment
|
||||||
import pl.szczodrzynski.edziennik.ui.modules.timetable.RegisterTimetableFragment
|
import pl.szczodrzynski.edziennik.ui.modules.timetable.TimetableFragment
|
||||||
import pl.szczodrzynski.edziennik.utils.SwipeRefreshLayoutNoTouch
|
import pl.szczodrzynski.edziennik.utils.SwipeRefreshLayoutNoTouch
|
||||||
import pl.szczodrzynski.edziennik.utils.Utils
|
import pl.szczodrzynski.edziennik.utils.Utils
|
||||||
import pl.szczodrzynski.navlib.bottomsheet.items.BottomSheetPrimaryItem
|
import pl.szczodrzynski.navlib.bottomsheet.items.BottomSheetPrimaryItem
|
||||||
@ -98,8 +98,8 @@ class MainActivity : AppCompatActivity() {
|
|||||||
const val DRAWER_ITEM_GRADES = 13
|
const val DRAWER_ITEM_GRADES = 13
|
||||||
const val DRAWER_ITEM_MESSAGES = 17
|
const val DRAWER_ITEM_MESSAGES = 17
|
||||||
const val DRAWER_ITEM_HOMEWORK = 14
|
const val DRAWER_ITEM_HOMEWORK = 14
|
||||||
const val DRAWER_ITEM_NOTICES = 15
|
const val DRAWER_ITEM_BEHAVIOUR = 15
|
||||||
const val DRAWER_ITEM_ATTENDANCES = 16
|
const val DRAWER_ITEM_ATTENDANCE = 16
|
||||||
const val DRAWER_ITEM_ANNOUNCEMENTS = 18
|
const val DRAWER_ITEM_ANNOUNCEMENTS = 18
|
||||||
const val DRAWER_ITEM_NOTIFICATIONS = 20
|
const val DRAWER_ITEM_NOTIFICATIONS = 20
|
||||||
const val DRAWER_ITEM_SETTINGS = 101
|
const val DRAWER_ITEM_SETTINGS = 101
|
||||||
@ -123,17 +123,17 @@ class MainActivity : AppCompatActivity() {
|
|||||||
.isStatic(true)
|
.isStatic(true)
|
||||||
.withPopToHome(false)
|
.withPopToHome(false)
|
||||||
|
|
||||||
list += NavTarget(DRAWER_ITEM_TIMETABLE, R.string.menu_timetable, RegisterTimetableFragment::class)
|
list += NavTarget(DRAWER_ITEM_TIMETABLE, R.string.menu_timetable, TimetableFragment::class)
|
||||||
.withIcon(CommunityMaterial.Icon2.cmd_timetable)
|
.withIcon(CommunityMaterial.Icon2.cmd_timetable)
|
||||||
.withBadgeTypeId(TYPE_LESSON_CHANGE)
|
.withBadgeTypeId(TYPE_LESSON_CHANGE)
|
||||||
.isInDrawer(true)
|
.isInDrawer(true)
|
||||||
|
|
||||||
list += NavTarget(DRAWER_ITEM_AGENDA, R.string.menu_agenda, RegisterAgendaDefaultFragment::class)
|
list += NavTarget(DRAWER_ITEM_AGENDA, R.string.menu_agenda, AgendaDefaultFragment::class)
|
||||||
.withIcon(CommunityMaterial.Icon.cmd_calendar)
|
.withIcon(CommunityMaterial.Icon.cmd_calendar)
|
||||||
.withBadgeTypeId(TYPE_EVENT)
|
.withBadgeTypeId(TYPE_EVENT)
|
||||||
.isInDrawer(true)
|
.isInDrawer(true)
|
||||||
|
|
||||||
list += NavTarget(DRAWER_ITEM_GRADES, R.string.menu_grades, RegisterGradesFragment::class)
|
list += NavTarget(DRAWER_ITEM_GRADES, R.string.menu_grades, GradesFragment::class)
|
||||||
.withIcon(CommunityMaterial.Icon2.cmd_numeric_5_box)
|
.withIcon(CommunityMaterial.Icon2.cmd_numeric_5_box)
|
||||||
.withBadgeTypeId(TYPE_GRADE)
|
.withBadgeTypeId(TYPE_GRADE)
|
||||||
.isInDrawer(true)
|
.isInDrawer(true)
|
||||||
@ -148,24 +148,24 @@ class MainActivity : AppCompatActivity() {
|
|||||||
.withBadgeTypeId(TYPE_HOMEWORK)
|
.withBadgeTypeId(TYPE_HOMEWORK)
|
||||||
.isInDrawer(true)
|
.isInDrawer(true)
|
||||||
|
|
||||||
list += NavTarget(DRAWER_ITEM_NOTICES, R.string.menu_notices, RegisterNoticesFragment::class)
|
list += NavTarget(DRAWER_ITEM_BEHAVIOUR, R.string.menu_notices, BehaviourFragment::class)
|
||||||
.withIcon(CommunityMaterial.Icon2.cmd_message_alert)
|
.withIcon(CommunityMaterial.Icon2.cmd_message_alert)
|
||||||
.withBadgeTypeId(TYPE_NOTICE)
|
.withBadgeTypeId(TYPE_NOTICE)
|
||||||
.isInDrawer(true)
|
.isInDrawer(true)
|
||||||
|
|
||||||
list += NavTarget(DRAWER_ITEM_ATTENDANCES, R.string.menu_attendances, RegisterAttendancesFragment::class)
|
list += NavTarget(DRAWER_ITEM_ATTENDANCE, R.string.menu_attendance, AttendanceFragment::class)
|
||||||
.withIcon(CommunityMaterial.Icon.cmd_calendar_remove)
|
.withIcon(CommunityMaterial.Icon.cmd_calendar_remove)
|
||||||
.withBadgeTypeId(TYPE_ATTENDANCE)
|
.withBadgeTypeId(TYPE_ATTENDANCE)
|
||||||
.isInDrawer(true)
|
.isInDrawer(true)
|
||||||
|
|
||||||
list += NavTarget(DRAWER_ITEM_ANNOUNCEMENTS, R.string.menu_announcements, RegisterAnnouncementsFragment::class)
|
list += NavTarget(DRAWER_ITEM_ANNOUNCEMENTS, R.string.menu_announcements, AnnouncementsFragment::class)
|
||||||
.withIcon(CommunityMaterial.Icon.cmd_bulletin_board)
|
.withIcon(CommunityMaterial.Icon.cmd_bulletin_board)
|
||||||
.withBadgeTypeId(TYPE_ANNOUNCEMENT)
|
.withBadgeTypeId(TYPE_ANNOUNCEMENT)
|
||||||
.isInDrawer(true)
|
.isInDrawer(true)
|
||||||
|
|
||||||
|
|
||||||
// static drawer items
|
// static drawer items
|
||||||
list += NavTarget(DRAWER_ITEM_NOTIFICATIONS, R.string.menu_notifications, RegisterNotificationsFragment::class)
|
list += NavTarget(DRAWER_ITEM_NOTIFICATIONS, R.string.menu_notifications, NotificationsFragment::class)
|
||||||
.withIcon(CommunityMaterial.Icon.cmd_bell_ring)
|
.withIcon(CommunityMaterial.Icon.cmd_bell_ring)
|
||||||
.isInDrawer(true)
|
.isInDrawer(true)
|
||||||
.isStatic(true)
|
.isStatic(true)
|
||||||
@ -537,8 +537,8 @@ class MainActivity : AppCompatActivity() {
|
|||||||
DRAWER_ITEM_AGENDA -> FEATURE_AGENDA
|
DRAWER_ITEM_AGENDA -> FEATURE_AGENDA
|
||||||
DRAWER_ITEM_GRADES -> FEATURE_GRADES
|
DRAWER_ITEM_GRADES -> FEATURE_GRADES
|
||||||
DRAWER_ITEM_HOMEWORK -> FEATURE_HOMEWORK
|
DRAWER_ITEM_HOMEWORK -> FEATURE_HOMEWORK
|
||||||
DRAWER_ITEM_NOTICES -> FEATURE_NOTICES
|
DRAWER_ITEM_BEHAVIOUR -> FEATURE_NOTICES
|
||||||
DRAWER_ITEM_ATTENDANCES -> FEATURE_ATTENDANCES
|
DRAWER_ITEM_ATTENDANCE -> FEATURE_ATTENDANCE
|
||||||
DRAWER_ITEM_MESSAGES -> when (MessagesFragment.pageSelection) {
|
DRAWER_ITEM_MESSAGES -> when (MessagesFragment.pageSelection) {
|
||||||
1 -> FEATURE_MESSAGES_OUTBOX
|
1 -> FEATURE_MESSAGES_OUTBOX
|
||||||
else -> FEATURE_MESSAGES_INBOX
|
else -> FEATURE_MESSAGES_INBOX
|
||||||
@ -553,8 +553,8 @@ class MainActivity : AppCompatActivity() {
|
|||||||
DRAWER_ITEM_AGENDA -> R.string.sync_feature_agenda
|
DRAWER_ITEM_AGENDA -> R.string.sync_feature_agenda
|
||||||
DRAWER_ITEM_GRADES -> R.string.sync_feature_grades
|
DRAWER_ITEM_GRADES -> R.string.sync_feature_grades
|
||||||
DRAWER_ITEM_HOMEWORK -> R.string.sync_feature_homework
|
DRAWER_ITEM_HOMEWORK -> R.string.sync_feature_homework
|
||||||
DRAWER_ITEM_NOTICES -> R.string.sync_feature_notices
|
DRAWER_ITEM_BEHAVIOUR -> R.string.sync_feature_notices
|
||||||
DRAWER_ITEM_ATTENDANCES -> R.string.sync_feature_attendances
|
DRAWER_ITEM_ATTENDANCE -> R.string.sync_feature_attendance
|
||||||
DRAWER_ITEM_MESSAGES -> when (MessagesFragment.pageSelection) {
|
DRAWER_ITEM_MESSAGES -> when (MessagesFragment.pageSelection) {
|
||||||
1 -> R.string.sync_feature_messages_outbox
|
1 -> R.string.sync_feature_messages_outbox
|
||||||
else -> R.string.sync_feature_messages_inbox
|
else -> R.string.sync_feature_messages_inbox
|
||||||
|
@ -84,7 +84,7 @@ import static pl.szczodrzynski.edziennik.data.api.AppError.stringErrorType;
|
|||||||
import static pl.szczodrzynski.edziennik.data.api.interfaces.EdziennikInterface.FEATURE_AGENDA;
|
import static pl.szczodrzynski.edziennik.data.api.interfaces.EdziennikInterface.FEATURE_AGENDA;
|
||||||
import static pl.szczodrzynski.edziennik.data.api.interfaces.EdziennikInterface.FEATURE_ALL;
|
import static pl.szczodrzynski.edziennik.data.api.interfaces.EdziennikInterface.FEATURE_ALL;
|
||||||
import static pl.szczodrzynski.edziennik.data.api.interfaces.EdziennikInterface.FEATURE_ANNOUNCEMENTS;
|
import static pl.szczodrzynski.edziennik.data.api.interfaces.EdziennikInterface.FEATURE_ANNOUNCEMENTS;
|
||||||
import static pl.szczodrzynski.edziennik.data.api.interfaces.EdziennikInterface.FEATURE_ATTENDANCES;
|
import static pl.szczodrzynski.edziennik.data.api.interfaces.EdziennikInterface.FEATURE_ATTENDANCE;
|
||||||
import static pl.szczodrzynski.edziennik.data.api.interfaces.EdziennikInterface.FEATURE_GRADES;
|
import static pl.szczodrzynski.edziennik.data.api.interfaces.EdziennikInterface.FEATURE_GRADES;
|
||||||
import static pl.szczodrzynski.edziennik.data.api.interfaces.EdziennikInterface.FEATURE_HOMEWORK;
|
import static pl.szczodrzynski.edziennik.data.api.interfaces.EdziennikInterface.FEATURE_HOMEWORK;
|
||||||
import static pl.szczodrzynski.edziennik.data.api.interfaces.EdziennikInterface.FEATURE_MESSAGES_INBOX;
|
import static pl.szczodrzynski.edziennik.data.api.interfaces.EdziennikInterface.FEATURE_MESSAGES_INBOX;
|
||||||
@ -354,7 +354,7 @@ public class Edziennik {
|
|||||||
app.notifier.add(new Notification(app.getContext(), text)
|
app.notifier.add(new Notification(app.getContext(), text)
|
||||||
.withProfileData(profile.getId(), profile.getName())
|
.withProfileData(profile.getId(), profile.getName())
|
||||||
.withType(Notification.TYPE_NEW_NOTICE)
|
.withType(Notification.TYPE_NEW_NOTICE)
|
||||||
.withFragmentRedirect(MainActivity.DRAWER_ITEM_NOTICES)
|
.withFragmentRedirect(MainActivity.DRAWER_ITEM_BEHAVIOUR)
|
||||||
.withLongExtra("noticeId", notice.id)
|
.withLongExtra("noticeId", notice.id)
|
||||||
.withAddedDate(notice.addedDate)
|
.withAddedDate(notice.addedDate)
|
||||||
);
|
);
|
||||||
@ -382,7 +382,7 @@ public class Edziennik {
|
|||||||
app.notifier.add(new Notification(app.getContext(), text)
|
app.notifier.add(new Notification(app.getContext(), text)
|
||||||
.withProfileData(profile.getId(), profile.getName())
|
.withProfileData(profile.getId(), profile.getName())
|
||||||
.withType(Notification.TYPE_NEW_ATTENDANCE)
|
.withType(Notification.TYPE_NEW_ATTENDANCE)
|
||||||
.withFragmentRedirect(MainActivity.DRAWER_ITEM_ATTENDANCES)
|
.withFragmentRedirect(MainActivity.DRAWER_ITEM_ATTENDANCE)
|
||||||
.withLongExtra("attendanceId", attendance.id)
|
.withLongExtra("attendanceId", attendance.id)
|
||||||
.withAddedDate(attendance.addedDate)
|
.withAddedDate(attendance.addedDate)
|
||||||
);
|
);
|
||||||
@ -849,7 +849,7 @@ public class Edziennik {
|
|||||||
app.getString(R.string.menu_grades),
|
app.getString(R.string.menu_grades),
|
||||||
app.getString(R.string.menu_homework),
|
app.getString(R.string.menu_homework),
|
||||||
app.getString(R.string.menu_notices),
|
app.getString(R.string.menu_notices),
|
||||||
app.getString(R.string.menu_attendances),
|
app.getString(R.string.menu_attendance),
|
||||||
app.getString(R.string.title_messages_inbox_single),
|
app.getString(R.string.title_messages_inbox_single),
|
||||||
app.getString(R.string.title_messages_sent_single),
|
app.getString(R.string.title_messages_sent_single),
|
||||||
app.getString(R.string.menu_announcements)
|
app.getString(R.string.menu_announcements)
|
||||||
@ -860,7 +860,7 @@ public class Edziennik {
|
|||||||
FEATURE_GRADES,
|
FEATURE_GRADES,
|
||||||
FEATURE_HOMEWORK,
|
FEATURE_HOMEWORK,
|
||||||
FEATURE_NOTICES,
|
FEATURE_NOTICES,
|
||||||
FEATURE_ATTENDANCES,
|
FEATURE_ATTENDANCE,
|
||||||
FEATURE_MESSAGES_INBOX,
|
FEATURE_MESSAGES_INBOX,
|
||||||
FEATURE_MESSAGES_OUTBOX,
|
FEATURE_MESSAGES_OUTBOX,
|
||||||
FEATURE_ANNOUNCEMENTS
|
FEATURE_ANNOUNCEMENTS
|
||||||
|
@ -200,7 +200,7 @@ public class Iuczniowie implements EdziennikInterface {
|
|||||||
targetEndpoints.add("Exams");
|
targetEndpoints.add("Exams");
|
||||||
targetEndpoints.add("Notices");
|
targetEndpoints.add("Notices");
|
||||||
targetEndpoints.add("Announcements");
|
targetEndpoints.add("Announcements");
|
||||||
targetEndpoints.add("Attendances");
|
targetEndpoints.add("Attendance");
|
||||||
targetEndpoints.add("MessagesInbox");
|
targetEndpoints.add("MessagesInbox");
|
||||||
targetEndpoints.add("MessagesOutbox");
|
targetEndpoints.add("MessagesOutbox");
|
||||||
targetEndpoints.add("Finish");
|
targetEndpoints.add("Finish");
|
||||||
@ -241,8 +241,8 @@ public class Iuczniowie implements EdziennikInterface {
|
|||||||
case FEATURE_NOTICES:
|
case FEATURE_NOTICES:
|
||||||
targetEndpoints.add("Notices");
|
targetEndpoints.add("Notices");
|
||||||
break;
|
break;
|
||||||
case FEATURE_ATTENDANCES:
|
case FEATURE_ATTENDANCE:
|
||||||
targetEndpoints.add("Attendances");
|
targetEndpoints.add("Attendance");
|
||||||
break;
|
break;
|
||||||
case FEATURE_MESSAGES_INBOX:
|
case FEATURE_MESSAGES_INBOX:
|
||||||
targetEndpoints.add("MessagesInbox");
|
targetEndpoints.add("MessagesInbox");
|
||||||
@ -300,9 +300,9 @@ public class Iuczniowie implements EdziennikInterface {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.attendancesMonth = today.month;
|
this.attendanceMonth = today.month;
|
||||||
this.attendancesYear = today.year;
|
this.attendanceYear = today.year;
|
||||||
this.attendancesPrevMonthChecked = false;
|
this.attendancePrevMonthChecked = false;
|
||||||
this.examsMonth = today.month;
|
this.examsMonth = today.month;
|
||||||
this.examsYear = today.year;
|
this.examsYear = today.year;
|
||||||
this.examsMonthsChecked = 0;
|
this.examsMonthsChecked = 0;
|
||||||
@ -352,8 +352,8 @@ public class Iuczniowie implements EdziennikInterface {
|
|||||||
case "Announcements":
|
case "Announcements":
|
||||||
getAnnouncements();
|
getAnnouncements();
|
||||||
break;
|
break;
|
||||||
case "Attendances":
|
case "Attendance":
|
||||||
getAttendances();
|
getAttendance();
|
||||||
break;
|
break;
|
||||||
case "MessagesInbox":
|
case "MessagesInbox":
|
||||||
getMessagesInbox();
|
getMessagesInbox();
|
||||||
@ -1196,17 +1196,17 @@ public class Iuczniowie implements EdziennikInterface {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private int attendancesYear;
|
private int attendanceYear;
|
||||||
private int attendancesMonth;
|
private int attendanceMonth;
|
||||||
private boolean attendancesPrevMonthChecked = false;
|
private boolean attendancePrevMonthChecked = false;
|
||||||
private void getAttendances() {
|
private void getAttendance() {
|
||||||
callback.onActionStarted(R.string.sync_action_syncing_attendances);
|
callback.onActionStarted(R.string.sync_action_syncing_attendance);
|
||||||
apiRequest(Request.builder()
|
apiRequest(Request.builder()
|
||||||
.url(IDZIENNIK_URL +"/mod_panelRodzica/obecnosci/WS_obecnosciUcznia.asmx/pobierzObecnosciUcznia")
|
.url(IDZIENNIK_URL +"/mod_panelRodzica/obecnosci/WS_obecnosciUcznia.asmx/pobierzObecnosciUcznia")
|
||||||
.userAgent(userAgent)
|
.userAgent(userAgent)
|
||||||
.addParameter("idPozDziennika", loginRegisterId)
|
.addParameter("idPozDziennika", loginRegisterId)
|
||||||
.addParameter("mc", attendancesMonth)
|
.addParameter("mc", attendanceMonth)
|
||||||
.addParameter("rok", attendancesYear)
|
.addParameter("rok", attendanceYear)
|
||||||
.addParameter("dataTygodnia", "")
|
.addParameter("dataTygodnia", "")
|
||||||
.postJson(), (result, response) -> {
|
.postJson(), (result, response) -> {
|
||||||
JsonObject data = result.getAsJsonObject("d");
|
JsonObject data = result.getAsJsonObject("d");
|
||||||
@ -1281,25 +1281,25 @@ public class Iuczniowie implements EdziennikInterface {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int attendancesDateValue = attendancesYear*10000 + attendancesMonth*100;
|
int attendanceDateValue = attendanceYear *10000 + attendanceMonth *100;
|
||||||
if (profile.getEmpty() && attendancesDateValue > profile.getSemesterStart(1).getValue()) {
|
if (profile.getEmpty() && attendanceDateValue > profile.getSemesterStart(1).getValue()) {
|
||||||
attendancesPrevMonthChecked = true; // do not need to check prev month later
|
attendancePrevMonthChecked = true; // do not need to check prev month later
|
||||||
attendancesMonth--;
|
attendanceMonth--;
|
||||||
if (attendancesMonth < 1) {
|
if (attendanceMonth < 1) {
|
||||||
attendancesMonth = 12;
|
attendanceMonth = 12;
|
||||||
attendancesYear--;
|
attendanceYear--;
|
||||||
}
|
}
|
||||||
r("get", "Attendances");
|
r("get", "Attendance");
|
||||||
} else if (!attendancesPrevMonthChecked /* get also the previous month */) {
|
} else if (!attendancePrevMonthChecked /* get also the previous month */) {
|
||||||
attendancesMonth--;
|
attendanceMonth--;
|
||||||
if (attendancesMonth < 1) {
|
if (attendanceMonth < 1) {
|
||||||
attendancesMonth = 12;
|
attendanceMonth = 12;
|
||||||
attendancesYear--;
|
attendanceYear--;
|
||||||
}
|
}
|
||||||
attendancesPrevMonthChecked = true;
|
attendancePrevMonthChecked = true;
|
||||||
r("get", "Attendances");
|
r("get", "Attendance");
|
||||||
} else {
|
} else {
|
||||||
r("finish", "Attendances");
|
r("finish", "Attendance");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -297,8 +297,8 @@ public class Librus implements EdziennikInterface {
|
|||||||
targetEndpoints.add("Homework");
|
targetEndpoints.add("Homework");
|
||||||
targetEndpoints.add("LuckyNumbers");
|
targetEndpoints.add("LuckyNumbers");
|
||||||
targetEndpoints.add("Notices");
|
targetEndpoints.add("Notices");
|
||||||
targetEndpoints.add("AttendancesTypes");
|
targetEndpoints.add("AttendanceTypes");
|
||||||
targetEndpoints.add("Attendances");
|
targetEndpoints.add("Attendance");
|
||||||
targetEndpoints.add("Announcements");
|
targetEndpoints.add("Announcements");
|
||||||
targetEndpoints.add("PtMeetings");
|
targetEndpoints.add("PtMeetings");
|
||||||
|
|
||||||
@ -371,9 +371,9 @@ public class Librus implements EdziennikInterface {
|
|||||||
case FEATURE_NOTICES:
|
case FEATURE_NOTICES:
|
||||||
targetEndpoints.add("Notices");
|
targetEndpoints.add("Notices");
|
||||||
break;
|
break;
|
||||||
case FEATURE_ATTENDANCES:
|
case FEATURE_ATTENDANCE:
|
||||||
targetEndpoints.add("AttendancesTypes");
|
targetEndpoints.add("AttendanceTypes");
|
||||||
targetEndpoints.add("Attendances");
|
targetEndpoints.add("Attendance");
|
||||||
break;
|
break;
|
||||||
case FEATURE_MESSAGES_INBOX:
|
case FEATURE_MESSAGES_INBOX:
|
||||||
if (!hasMessagesLogin) {
|
if (!hasMessagesLogin) {
|
||||||
@ -527,11 +527,11 @@ public class Librus implements EdziennikInterface {
|
|||||||
case "Notices":
|
case "Notices":
|
||||||
getNotices();
|
getNotices();
|
||||||
break;
|
break;
|
||||||
case "AttendancesTypes":
|
case "AttendanceTypes":
|
||||||
getAttendancesTypes();
|
getAttendanceTypes();
|
||||||
break;
|
break;
|
||||||
case "Attendances":
|
case "Attendance":
|
||||||
getAttendances();
|
getAttendance();
|
||||||
break;
|
break;
|
||||||
case "Announcements":
|
case "Announcements":
|
||||||
getAnnouncements();
|
getAnnouncements();
|
||||||
@ -2888,11 +2888,11 @@ public class Librus implements EdziennikInterface {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private SparseArray<Pair<Integer, String>> attendanceTypes = new SparseArray<>();
|
private SparseArray<Pair<Integer, String>> attendanceTypes = new SparseArray<>();
|
||||||
private void getAttendancesTypes() {
|
private void getAttendanceTypes() {
|
||||||
callback.onActionStarted(R.string.sync_action_syncing_attendance_types);
|
callback.onActionStarted(R.string.sync_action_syncing_attendance_types);
|
||||||
apiRequest("Attendances/Types", data -> {
|
apiRequest("Attendances/Types", data -> {
|
||||||
if (data == null) {
|
if (data == null) {
|
||||||
r("finish", "AttendancesTypes");
|
r("finish", "AttendanceTypes");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
@ -2907,7 +2907,7 @@ public class Librus implements EdziennikInterface {
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
r("finish", "AttendancesTypes");
|
r("finish", "AttendanceTypes");
|
||||||
}
|
}
|
||||||
catch (Exception e) {
|
catch (Exception e) {
|
||||||
finishWithError(new AppError(TAG, 2782, CODE_OTHER, e, data));
|
finishWithError(new AppError(TAG, 2782, CODE_OTHER, e, data));
|
||||||
@ -2915,18 +2915,18 @@ public class Librus implements EdziennikInterface {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private void getAttendances() {
|
private void getAttendance() {
|
||||||
callback.onActionStarted(R.string.sync_action_syncing_attendances);
|
callback.onActionStarted(R.string.sync_action_syncing_attendance);
|
||||||
apiRequest("Attendances"+(fullSync ? "" : "?dateFrom="+ Date.getToday().stepForward(0, -1, 0).getStringY_m_d()), data -> {
|
apiRequest("Attendances"+(fullSync ? "" : "?dateFrom="+ Date.getToday().stepForward(0, -1, 0).getStringY_m_d()), data -> {
|
||||||
if (data == null) {
|
if (data == null) {
|
||||||
r("finish", "Attendances");
|
r("finish", "Attendance");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
JsonArray jAttendances = data.get("Attendances").getAsJsonArray();
|
JsonArray jAttendance = data.get("Attendances").getAsJsonArray();
|
||||||
|
|
||||||
for (JsonElement attendanceEl : jAttendances) {
|
for (JsonElement attendanceEl : jAttendance) {
|
||||||
JsonObject attendance = attendanceEl.getAsJsonObject();
|
JsonObject attendance = attendanceEl.getAsJsonObject();
|
||||||
|
|
||||||
int type = attendance.getAsJsonObject("Type").get("Id").getAsInt();
|
int type = attendance.getAsJsonObject("Type").get("Id").getAsInt();
|
||||||
@ -2992,7 +2992,7 @@ public class Librus implements EdziennikInterface {
|
|||||||
metadataList.add(new Metadata(profileId, Metadata.TYPE_ATTENDANCE, attendanceObject.id, profile.getEmpty(), profile.getEmpty(), addedDate));
|
metadataList.add(new Metadata(profileId, Metadata.TYPE_ATTENDANCE, attendanceObject.id, profile.getEmpty(), profile.getEmpty(), addedDate));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
r("finish", "Attendances");
|
r("finish", "Attendance");
|
||||||
}
|
}
|
||||||
catch (Exception e) {
|
catch (Exception e) {
|
||||||
finishWithError(new AppError(TAG, 2872, CODE_OTHER, e, data));
|
finishWithError(new AppError(TAG, 2872, CODE_OTHER, e, data));
|
||||||
@ -3380,7 +3380,7 @@ public class Librus implements EdziennikInterface {
|
|||||||
configurableEndpoints.put("Homework", new Endpoint("Homework",true, false, profile.getChangedEndpoints()));
|
configurableEndpoints.put("Homework", new Endpoint("Homework",true, false, profile.getChangedEndpoints()));
|
||||||
configurableEndpoints.put("LuckyNumbers", new Endpoint("LuckyNumbers",true, false, profile.getChangedEndpoints()));
|
configurableEndpoints.put("LuckyNumbers", new Endpoint("LuckyNumbers",true, false, profile.getChangedEndpoints()));
|
||||||
configurableEndpoints.put("Notices", new Endpoint("Notices",true, false, profile.getChangedEndpoints()));
|
configurableEndpoints.put("Notices", new Endpoint("Notices",true, false, profile.getChangedEndpoints()));
|
||||||
configurableEndpoints.put("Attendances", new Endpoint("Attendances",true, false, profile.getChangedEndpoints()));
|
configurableEndpoints.put("Attendance", new Endpoint("Attendance",true, false, profile.getChangedEndpoints()));
|
||||||
configurableEndpoints.put("Announcements", new Endpoint("Announcements",true, true, profile.getChangedEndpoints()));
|
configurableEndpoints.put("Announcements", new Endpoint("Announcements",true, true, profile.getChangedEndpoints()));
|
||||||
configurableEndpoints.put("PtMeetings", new Endpoint("PtMeetings",true, true, profile.getChangedEndpoints()));
|
configurableEndpoints.put("PtMeetings", new Endpoint("PtMeetings",true, true, profile.getChangedEndpoints()));
|
||||||
configurableEndpoints.put("TeacherFreeDays", new Endpoint("TeacherFreeDays",false, false, profile.getChangedEndpoints()));
|
configurableEndpoints.put("TeacherFreeDays", new Endpoint("TeacherFreeDays",false, false, profile.getChangedEndpoints()));
|
||||||
|
@ -150,7 +150,7 @@ public class Mobidziennik implements EdziennikInterface {
|
|||||||
private String loginPassword = null;
|
private String loginPassword = null;
|
||||||
private int studentId = -1;
|
private int studentId = -1;
|
||||||
|
|
||||||
private long attendancesLastSync = 0;
|
private long attendanceLastSync = 0;
|
||||||
|
|
||||||
private boolean prepare(@NonNull Context activityContext, @NonNull SyncCallback callback, int profileId, @Nullable Profile profile, @NonNull LoginStore loginStore) {
|
private boolean prepare(@NonNull Context activityContext, @NonNull SyncCallback callback, int profileId, @Nullable Profile profile, @NonNull LoginStore loginStore) {
|
||||||
this.activityContext = activityContext;
|
this.activityContext = activityContext;
|
||||||
@ -171,7 +171,7 @@ public class Mobidziennik implements EdziennikInterface {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
this.studentId = profile == null ? -1 : profile.getStudentData("studentId", -1);
|
this.studentId = profile == null ? -1 : profile.getStudentData("studentId", -1);
|
||||||
this.attendancesLastSync = profile == null ? 0 : profile.getStudentData("attendancesLastSync", (long)0);
|
this.attendanceLastSync = profile == null ? 0 : profile.getStudentData("attendanceLastSync", (long)0);
|
||||||
fakeLogin = BuildConfig.DEBUG && loginUsername.toLowerCase().startsWith("fake");
|
fakeLogin = BuildConfig.DEBUG && loginUsername.toLowerCase().startsWith("fake");
|
||||||
|
|
||||||
teamList = profileId == -1 ? new ArrayList<>() : app.db.teamDao().getAllNow(profileId);
|
teamList = profileId == -1 ? new ArrayList<>() : app.db.teamDao().getAllNow(profileId);
|
||||||
@ -204,7 +204,7 @@ public class Mobidziennik implements EdziennikInterface {
|
|||||||
targetEndpoints = new ArrayList<>();
|
targetEndpoints = new ArrayList<>();
|
||||||
targetEndpoints.add("GetData");
|
targetEndpoints.add("GetData");
|
||||||
targetEndpoints.add("ProcessData");
|
targetEndpoints.add("ProcessData");
|
||||||
targetEndpoints.add("Attendances");
|
targetEndpoints.add("Attendance");
|
||||||
targetEndpoints.add("ClassCalendar");
|
targetEndpoints.add("ClassCalendar");
|
||||||
targetEndpoints.add("GradeDetails");
|
targetEndpoints.add("GradeDetails");
|
||||||
targetEndpoints.add("NoticeDetails");
|
targetEndpoints.add("NoticeDetails");
|
||||||
@ -256,8 +256,8 @@ public class Mobidziennik implements EdziennikInterface {
|
|||||||
case FEATURE_NOTICES:
|
case FEATURE_NOTICES:
|
||||||
targetEndpoints.add("NoticeDetails");
|
targetEndpoints.add("NoticeDetails");
|
||||||
break;
|
break;
|
||||||
case FEATURE_ATTENDANCES:
|
case FEATURE_ATTENDANCE:
|
||||||
targetEndpoints.add("Attendances");
|
targetEndpoints.add("Attendance");
|
||||||
break;
|
break;
|
||||||
case FEATURE_MESSAGES_INBOX:
|
case FEATURE_MESSAGES_INBOX:
|
||||||
targetEndpoints.add("MessagesInbox");
|
targetEndpoints.add("MessagesInbox");
|
||||||
@ -314,8 +314,8 @@ public class Mobidziennik implements EdziennikInterface {
|
|||||||
case "NoticeDetails":
|
case "NoticeDetails":
|
||||||
getNoticeDetails();
|
getNoticeDetails();
|
||||||
break;
|
break;
|
||||||
case "Attendances":
|
case "Attendance":
|
||||||
getAttendances();
|
getAttendance();
|
||||||
break;
|
break;
|
||||||
case "Messages":
|
case "Messages":
|
||||||
getAllMessages();
|
getAllMessages();
|
||||||
@ -597,7 +597,7 @@ public class Mobidziennik implements EdziennikInterface {
|
|||||||
processLessons(table);
|
processLessons(table);
|
||||||
}
|
}
|
||||||
if (i == 16) {
|
if (i == 16) {
|
||||||
processAttendances(table);
|
processAttendance(table);
|
||||||
}
|
}
|
||||||
if (i == 17) {
|
if (i == 17) {
|
||||||
processNotices(table);
|
processNotices(table);
|
||||||
@ -1051,20 +1051,20 @@ public class Mobidziennik implements EdziennikInterface {
|
|||||||
this.lessonId = lessonId;
|
this.lessonId = lessonId;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
private Date attendancesCheckDate = Week.getWeekStart();
|
private Date attendanceCheckDate = Week.getWeekStart();
|
||||||
private void getAttendances() {
|
private void getAttendance() {
|
||||||
r("finish", "Attendances");
|
r("finish", "Attendance");
|
||||||
// TODO: 2019-09-10 please download attendances from /dziennik/frekwencja. /mobile does not work above v13.0
|
// TODO: 2019-09-10 please download attendance from /dziennik/frekwencja. /mobile does not work above v13.0
|
||||||
if (true) {
|
if (true) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
callback.onActionStarted(R.string.sync_action_syncing_attendances);
|
callback.onActionStarted(R.string.sync_action_syncing_attendance);
|
||||||
d(TAG, "Get attendances for week "+attendancesCheckDate.getStringY_m_d());
|
d(TAG, "Get attendance for week "+ attendanceCheckDate.getStringY_m_d());
|
||||||
Request.builder()
|
Request.builder()
|
||||||
.url(fakeLogin ? "https://szkolny.eu/mobimobi/mobi_mod_frekwencja.php" : "https://" + loginServerName + ".mobidziennik.pl/mobile/frekwencja")
|
.url(fakeLogin ? "https://szkolny.eu/mobimobi/mobi_mod_frekwencja.php" : "https://" + loginServerName + ".mobidziennik.pl/mobile/frekwencja")
|
||||||
.userAgent(System.getProperty("http.agent"))
|
.userAgent(System.getProperty("http.agent"))
|
||||||
.addParameter("uczen", studentId)
|
.addParameter("uczen", studentId)
|
||||||
.addParameter("data_poniedzialek", attendancesCheckDate.getStringY_m_d())
|
.addParameter("data_poniedzialek", attendanceCheckDate.getStringY_m_d())
|
||||||
.post()
|
.post()
|
||||||
.callback(new TextCallbackHandler() {
|
.callback(new TextCallbackHandler() {
|
||||||
@Override
|
@Override
|
||||||
@ -1076,11 +1076,11 @@ public class Mobidziennik implements EdziennikInterface {
|
|||||||
public void onSuccess(String data, Response response) {
|
public void onSuccess(String data, Response response) {
|
||||||
// just skip any failures here
|
// just skip any failures here
|
||||||
if (data == null || data.equals("")) {
|
if (data == null || data.equals("")) {
|
||||||
r("finish", "Attendances");
|
r("finish", "Attendance");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (data.contains("nie-pamietam-hasla")) {
|
if (data.contains("nie-pamietam-hasla")) {
|
||||||
r("finish", "Attendances");
|
r("finish", "Attendance");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1135,7 +1135,7 @@ public class Mobidziennik implements EdziennikInterface {
|
|||||||
continue;
|
continue;
|
||||||
AttendanceLessonRange range = ranges.get(currentIndex);
|
AttendanceLessonRange range = ranges.get(currentIndex);
|
||||||
|
|
||||||
Date date = attendancesCheckDate.clone().stepForward(0, 0, range.weekDay);
|
Date date = attendanceCheckDate.clone().stepForward(0, 0, range.weekDay);
|
||||||
long addedDate = date.combineWith(range.startTime);
|
long addedDate = date.combineWith(range.startTime);
|
||||||
|
|
||||||
int markerIndex = 0;
|
int markerIndex = 0;
|
||||||
@ -1201,7 +1201,7 @@ public class Mobidziennik implements EdziennikInterface {
|
|||||||
markerIndex++;
|
markerIndex++;
|
||||||
attendanceList.add(attendanceObject);
|
attendanceList.add(attendanceObject);
|
||||||
if (attendanceObject.type != TYPE_PRESENT) {
|
if (attendanceObject.type != TYPE_PRESENT) {
|
||||||
boolean markAsRead = onlyFeature == FEATURE_ATTENDANCES && attendancesLastSync == 0;
|
boolean markAsRead = onlyFeature == FEATURE_ATTENDANCE && attendanceLastSync == 0;
|
||||||
metadataList.add(new Metadata(profileId, Metadata.TYPE_ATTENDANCE, attendanceObject.id, profile.getEmpty() || markAsRead, profile.getEmpty() || markAsRead, addedDate));
|
metadataList.add(new Metadata(profileId, Metadata.TYPE_ATTENDANCE, attendanceObject.id, profile.getEmpty() || markAsRead, profile.getEmpty() || markAsRead, addedDate));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1209,40 +1209,40 @@ public class Mobidziennik implements EdziennikInterface {
|
|||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
Crashlytics.logException(e);
|
Crashlytics.logException(e);
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
if (onlyFeature == FEATURE_ATTENDANCES)
|
if (onlyFeature == FEATURE_ATTENDANCE)
|
||||||
finishWithError(new AppError(TAG, 955, CODE_OTHER, response, e, data));
|
finishWithError(new AppError(TAG, 955, CODE_OTHER, response, e, data));
|
||||||
else
|
else
|
||||||
r("finish", "Attendances");
|
r("finish", "Attendance");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (onlyFeature == FEATURE_ATTENDANCES) {
|
if (onlyFeature == FEATURE_ATTENDANCE) {
|
||||||
// syncing attendances exclusively
|
// syncing attendance exclusively
|
||||||
if (attendancesLastSync == 0) {
|
if (attendanceLastSync == 0) {
|
||||||
// first sync - get attendances until it's start of the school year
|
// first sync - get attendance until it's start of the school year
|
||||||
attendancesLastSync = profile.getSemesterStart(1).getInMillis();
|
attendanceLastSync = profile.getSemesterStart(1).getInMillis();
|
||||||
}
|
}
|
||||||
Date lastSyncDate = Date.fromMillis(attendancesLastSync);
|
Date lastSyncDate = Date.fromMillis(attendanceLastSync);
|
||||||
lastSyncDate.stepForward(0, 0, -7);
|
lastSyncDate.stepForward(0, 0, -7);
|
||||||
if (lastSyncDate.getValue() < attendancesCheckDate.getValue()) {
|
if (lastSyncDate.getValue() < attendanceCheckDate.getValue()) {
|
||||||
attendancesCheckDate.stepForward(0, 0, -7);
|
attendanceCheckDate.stepForward(0, 0, -7);
|
||||||
r("get", "Attendances");
|
r("get", "Attendance");
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
profile.putStudentData("attendancesLastSync", System.currentTimeMillis());
|
profile.putStudentData("attendanceLastSync", System.currentTimeMillis());
|
||||||
r("finish", "Attendances");
|
r("finish", "Attendance");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (attendancesLastSync != 0) {
|
if (attendanceLastSync != 0) {
|
||||||
// not a first sync
|
// not a first sync
|
||||||
Date lastSyncDate = Date.fromMillis(attendancesLastSync);
|
Date lastSyncDate = Date.fromMillis(attendanceLastSync);
|
||||||
lastSyncDate.stepForward(0, 0, 2);
|
lastSyncDate.stepForward(0, 0, 2);
|
||||||
if (lastSyncDate.getValue() >= attendancesCheckDate.getValue()) {
|
if (lastSyncDate.getValue() >= attendanceCheckDate.getValue()) {
|
||||||
profile.putStudentData("attendancesLastSync", System.currentTimeMillis());
|
profile.putStudentData("attendanceLastSync", System.currentTimeMillis());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
r("finish", "Attendances");
|
r("finish", "Attendance");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@ -1675,12 +1675,12 @@ public class Mobidziennik implements EdziennikInterface {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void processAttendances(String table)
|
private void processAttendance(String table)
|
||||||
{
|
{
|
||||||
if (true)
|
if (true)
|
||||||
return;
|
return;
|
||||||
String[] attendances = table.split("\n");
|
String[] attendanceList = table.split("\n");
|
||||||
for (String attendanceStr: attendances)
|
for (String attendanceStr: attendanceList)
|
||||||
{
|
{
|
||||||
if (attendanceStr.isEmpty()) {
|
if (attendanceStr.isEmpty()) {
|
||||||
continue;
|
continue;
|
||||||
@ -1718,7 +1718,7 @@ public class Mobidziennik implements EdziennikInterface {
|
|||||||
mobiLesson.date,
|
mobiLesson.date,
|
||||||
mobiLesson.startTime,
|
mobiLesson.startTime,
|
||||||
type);
|
type);
|
||||||
attendanceList.add(attendanceObject);
|
this.attendanceList.add(attendanceObject);
|
||||||
metadataList.add(new Metadata(profileId, Metadata.TYPE_ATTENDANCE, attendanceObject.id, profile.getEmpty(), profile.getEmpty(), System.currentTimeMillis()));
|
metadataList.add(new Metadata(profileId, Metadata.TYPE_ATTENDANCE, attendanceObject.id, profile.getEmpty(), profile.getEmpty(), System.currentTimeMillis()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -110,7 +110,7 @@ public class Vulcan implements EdziennikInterface {
|
|||||||
private static final String ENDPOINT_EVENTS = "mobile-api/Uczen.v3.Uczen/Sprawdziany";
|
private static final String ENDPOINT_EVENTS = "mobile-api/Uczen.v3.Uczen/Sprawdziany";
|
||||||
private static final String ENDPOINT_HOMEWORK = "mobile-api/Uczen.v3.Uczen/ZadaniaDomowe";
|
private static final String ENDPOINT_HOMEWORK = "mobile-api/Uczen.v3.Uczen/ZadaniaDomowe";
|
||||||
private static final String ENDPOINT_NOTICES = "mobile-api/Uczen.v3.Uczen/UwagiUcznia";
|
private static final String ENDPOINT_NOTICES = "mobile-api/Uczen.v3.Uczen/UwagiUcznia";
|
||||||
private static final String ENDPOINT_ATTENDANCES = "mobile-api/Uczen.v3.Uczen/Frekwencje";
|
private static final String ENDPOINT_ATTENDANCE = "mobile-api/Uczen.v3.Uczen/Frekwencje";
|
||||||
private static final String ENDPOINT_MESSAGES_RECEIVED = "mobile-api/Uczen.v3.Uczen/WiadomosciOdebrane";
|
private static final String ENDPOINT_MESSAGES_RECEIVED = "mobile-api/Uczen.v3.Uczen/WiadomosciOdebrane";
|
||||||
private static final String ENDPOINT_MESSAGES_SENT = "mobile-api/Uczen.v3.Uczen/WiadomosciWyslane";
|
private static final String ENDPOINT_MESSAGES_SENT = "mobile-api/Uczen.v3.Uczen/WiadomosciWyslane";
|
||||||
private static final String ENDPOINT_MESSAGES_CHANGE_STATUS = "mobile-api/Uczen.v3.Uczen/ZmienStatusWiadomosci";
|
private static final String ENDPOINT_MESSAGES_CHANGE_STATUS = "mobile-api/Uczen.v3.Uczen/ZmienStatusWiadomosci";
|
||||||
@ -261,7 +261,7 @@ public class Vulcan implements EdziennikInterface {
|
|||||||
targetEndpoints.add("Events");
|
targetEndpoints.add("Events");
|
||||||
targetEndpoints.add("Homework");
|
targetEndpoints.add("Homework");
|
||||||
targetEndpoints.add("Notices");
|
targetEndpoints.add("Notices");
|
||||||
targetEndpoints.add("Attendances");
|
targetEndpoints.add("Attendance");
|
||||||
targetEndpoints.add("MessagesInbox");
|
targetEndpoints.add("MessagesInbox");
|
||||||
targetEndpoints.add("MessagesOutbox");
|
targetEndpoints.add("MessagesOutbox");
|
||||||
targetEndpoints.add("Finish");
|
targetEndpoints.add("Finish");
|
||||||
@ -303,8 +303,8 @@ public class Vulcan implements EdziennikInterface {
|
|||||||
case FEATURE_NOTICES:
|
case FEATURE_NOTICES:
|
||||||
targetEndpoints.add("Notices");
|
targetEndpoints.add("Notices");
|
||||||
break;
|
break;
|
||||||
case FEATURE_ATTENDANCES:
|
case FEATURE_ATTENDANCE:
|
||||||
targetEndpoints.add("Attendances");
|
targetEndpoints.add("Attendance");
|
||||||
break;
|
break;
|
||||||
case FEATURE_MESSAGES_INBOX:
|
case FEATURE_MESSAGES_INBOX:
|
||||||
targetEndpoints.add("MessagesInbox");
|
targetEndpoints.add("MessagesInbox");
|
||||||
@ -386,8 +386,8 @@ public class Vulcan implements EdziennikInterface {
|
|||||||
case "Notices":
|
case "Notices":
|
||||||
getNotices();
|
getNotices();
|
||||||
break;
|
break;
|
||||||
case "Attendances":
|
case "Attendance":
|
||||||
getAttendances();
|
getAttendance();
|
||||||
break;
|
break;
|
||||||
case "MessagesInbox":
|
case "MessagesInbox":
|
||||||
getMessagesInbox();
|
getMessagesInbox();
|
||||||
@ -1459,18 +1459,18 @@ public class Vulcan implements EdziennikInterface {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private void getAttendances() {
|
private void getAttendance() {
|
||||||
callback.onActionStarted(R.string.sync_action_syncing_attendances);
|
callback.onActionStarted(R.string.sync_action_syncing_attendance);
|
||||||
JsonObject json = new JsonObject();
|
JsonObject json = new JsonObject();
|
||||||
json.addProperty("DataPoczatkowa", true ? getCurrentSemesterStartDate().getStringY_m_d() : oneMonthBack.getStringY_m_d());
|
json.addProperty("DataPoczatkowa", true ? getCurrentSemesterStartDate().getStringY_m_d() : oneMonthBack.getStringY_m_d());
|
||||||
json.addProperty("DataKoncowa", getCurrentSemesterEndDate().getStringY_m_d());
|
json.addProperty("DataKoncowa", getCurrentSemesterEndDate().getStringY_m_d());
|
||||||
json.addProperty("IdOddzial", studentClassId);
|
json.addProperty("IdOddzial", studentClassId);
|
||||||
json.addProperty("IdUczen", studentId);
|
json.addProperty("IdUczen", studentId);
|
||||||
json.addProperty("IdOkresKlasyfikacyjny", studentSemesterId);
|
json.addProperty("IdOkresKlasyfikacyjny", studentSemesterId);
|
||||||
apiRequest(schoolSymbol+"/"+ENDPOINT_ATTENDANCES, json, result -> {
|
apiRequest(schoolSymbol+"/"+ ENDPOINT_ATTENDANCE, json, result -> {
|
||||||
JsonArray attendances = result.getAsJsonObject("Data").getAsJsonArray("Frekwencje");
|
JsonArray attendanceList = result.getAsJsonObject("Data").getAsJsonArray("Frekwencje");
|
||||||
|
|
||||||
for (JsonElement attendanceEl: attendances) {
|
for (JsonElement attendanceEl: attendanceList) {
|
||||||
JsonObject attendance = attendanceEl.getAsJsonObject();
|
JsonObject attendance = attendanceEl.getAsJsonObject();
|
||||||
|
|
||||||
Pair<Integer, String> attendanceCategory = attendanceCategories.get(attendance.get("IdKategoria").getAsInt());
|
Pair<Integer, String> attendanceCategory = attendanceCategories.get(attendance.get("IdKategoria").getAsInt());
|
||||||
@ -1497,12 +1497,12 @@ public class Vulcan implements EdziennikInterface {
|
|||||||
lessonRanges.get(attendance.get("IdPoraLekcji").getAsInt()).first,
|
lessonRanges.get(attendance.get("IdPoraLekcji").getAsInt()).first,
|
||||||
type);
|
type);
|
||||||
|
|
||||||
attendanceList.add(attendanceObject);
|
this.attendanceList.add(attendanceObject);
|
||||||
if (attendanceObject.type != TYPE_PRESENT) {
|
if (attendanceObject.type != TYPE_PRESENT) {
|
||||||
metadataList.add(new Metadata(profileId, Metadata.TYPE_ATTENDANCE, attendanceObject.id, profile.getEmpty(), profile.getEmpty(), attendanceObject.lessonDate.combineWith(attendanceObject.startTime)));
|
metadataList.add(new Metadata(profileId, Metadata.TYPE_ATTENDANCE, attendanceObject.id, profile.getEmpty(), profile.getEmpty(), attendanceObject.lessonDate.combineWith(attendanceObject.startTime)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
r("finish", "Attendances");
|
r("finish", "Attendance");
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -36,7 +36,7 @@ public interface EdziennikInterface {
|
|||||||
int FEATURE_GRADES = 3;
|
int FEATURE_GRADES = 3;
|
||||||
int FEATURE_HOMEWORK = 4;
|
int FEATURE_HOMEWORK = 4;
|
||||||
int FEATURE_NOTICES = 5;
|
int FEATURE_NOTICES = 5;
|
||||||
int FEATURE_ATTENDANCES = 6;
|
int FEATURE_ATTENDANCE = 6;
|
||||||
int FEATURE_MESSAGES_INBOX = 7;
|
int FEATURE_MESSAGES_INBOX = 7;
|
||||||
int FEATURE_MESSAGES_OUTBOX = 8;
|
int FEATURE_MESSAGES_OUTBOX = 8;
|
||||||
int FEATURE_ANNOUNCEMENTS = 9;
|
int FEATURE_ANNOUNCEMENTS = 9;
|
||||||
|
@ -6,7 +6,7 @@ const val FEATURE_AGENDA = 2
|
|||||||
const val FEATURE_GRADES = 3
|
const val FEATURE_GRADES = 3
|
||||||
const val FEATURE_HOMEWORK = 4
|
const val FEATURE_HOMEWORK = 4
|
||||||
const val FEATURE_NOTICES = 5
|
const val FEATURE_NOTICES = 5
|
||||||
const val FEATURE_ATTENDANCES = 6
|
const val FEATURE_ATTENDANCE = 6
|
||||||
const val FEATURE_MESSAGES_INBOX = 7
|
const val FEATURE_MESSAGES_INBOX = 7
|
||||||
const val FEATURE_MESSAGES_OUTBOX = 8
|
const val FEATURE_MESSAGES_OUTBOX = 8
|
||||||
const val FEATURE_ANNOUNCEMENTS = 9
|
const val FEATURE_ANNOUNCEMENTS = 9
|
||||||
|
@ -204,7 +204,7 @@ public abstract class MetadataDao {
|
|||||||
public abstract void deleteUnusedNotices(int profileId);
|
public abstract void deleteUnusedNotices(int profileId);
|
||||||
|
|
||||||
@Query("DELETE FROM metadata WHERE profileId = :profileId AND thingType = "+TYPE_ATTENDANCE+" AND thingId NOT IN (SELECT attendanceId FROM attendances WHERE profileId = :profileId);")
|
@Query("DELETE FROM metadata WHERE profileId = :profileId AND thingType = "+TYPE_ATTENDANCE+" AND thingId NOT IN (SELECT attendanceId FROM attendances WHERE profileId = :profileId);")
|
||||||
public abstract void deleteUnusedAttendances(int profileId);
|
public abstract void deleteUnusedAttendance(int profileId);
|
||||||
|
|
||||||
@Query("DELETE FROM metadata WHERE profileId = :profileId AND thingType = "+TYPE_EVENT+" AND thingId NOT IN (SELECT eventId FROM events WHERE profileId = :profileId AND eventType != -1);")
|
@Query("DELETE FROM metadata WHERE profileId = :profileId AND thingType = "+TYPE_EVENT+" AND thingId NOT IN (SELECT eventId FROM events WHERE profileId = :profileId AND eventType != -1);")
|
||||||
public abstract void deleteUnusedEvents(int profileId);
|
public abstract void deleteUnusedEvents(int profileId);
|
||||||
@ -225,7 +225,7 @@ public abstract class MetadataDao {
|
|||||||
public void deleteUnused(int profileId) {
|
public void deleteUnused(int profileId) {
|
||||||
deleteUnusedGrades(profileId);
|
deleteUnusedGrades(profileId);
|
||||||
deleteUnusedNotices(profileId);
|
deleteUnusedNotices(profileId);
|
||||||
deleteUnusedAttendances(profileId);
|
deleteUnusedAttendance(profileId);
|
||||||
deleteUnusedEvents(profileId);
|
deleteUnusedEvents(profileId);
|
||||||
deleteUnusedHomework(profileId);
|
deleteUnusedHomework(profileId);
|
||||||
deleteUnusedLessonChanges(profileId);
|
deleteUnusedLessonChanges(profileId);
|
||||||
|
@ -5,11 +5,11 @@ import androidx.room.ColumnInfo
|
|||||||
import com.google.gson.JsonObject
|
import com.google.gson.JsonObject
|
||||||
import pl.szczodrzynski.edziennik.MainActivity.Companion.DRAWER_ITEM_AGENDA
|
import pl.szczodrzynski.edziennik.MainActivity.Companion.DRAWER_ITEM_AGENDA
|
||||||
import pl.szczodrzynski.edziennik.MainActivity.Companion.DRAWER_ITEM_ANNOUNCEMENTS
|
import pl.szczodrzynski.edziennik.MainActivity.Companion.DRAWER_ITEM_ANNOUNCEMENTS
|
||||||
import pl.szczodrzynski.edziennik.MainActivity.Companion.DRAWER_ITEM_ATTENDANCES
|
import pl.szczodrzynski.edziennik.MainActivity.Companion.DRAWER_ITEM_ATTENDANCE
|
||||||
import pl.szczodrzynski.edziennik.MainActivity.Companion.DRAWER_ITEM_GRADES
|
import pl.szczodrzynski.edziennik.MainActivity.Companion.DRAWER_ITEM_GRADES
|
||||||
import pl.szczodrzynski.edziennik.MainActivity.Companion.DRAWER_ITEM_HOMEWORK
|
import pl.szczodrzynski.edziennik.MainActivity.Companion.DRAWER_ITEM_HOMEWORK
|
||||||
import pl.szczodrzynski.edziennik.MainActivity.Companion.DRAWER_ITEM_MESSAGES
|
import pl.szczodrzynski.edziennik.MainActivity.Companion.DRAWER_ITEM_MESSAGES
|
||||||
import pl.szczodrzynski.edziennik.MainActivity.Companion.DRAWER_ITEM_NOTICES
|
import pl.szczodrzynski.edziennik.MainActivity.Companion.DRAWER_ITEM_BEHAVIOUR
|
||||||
import pl.szczodrzynski.edziennik.MainActivity.Companion.DRAWER_ITEM_TIMETABLE
|
import pl.szczodrzynski.edziennik.MainActivity.Companion.DRAWER_ITEM_TIMETABLE
|
||||||
import pl.szczodrzynski.edziennik.data.db.modules.login.LoginStore
|
import pl.szczodrzynski.edziennik.data.db.modules.login.LoginStore
|
||||||
import pl.szczodrzynski.edziennik.data.db.modules.login.LoginStore.*
|
import pl.szczodrzynski.edziennik.data.db.modules.login.LoginStore.*
|
||||||
@ -52,8 +52,8 @@ class ProfileFull : Profile {
|
|||||||
fragmentIds.add(DRAWER_ITEM_GRADES)
|
fragmentIds.add(DRAWER_ITEM_GRADES)
|
||||||
fragmentIds.add(DRAWER_ITEM_MESSAGES)
|
fragmentIds.add(DRAWER_ITEM_MESSAGES)
|
||||||
fragmentIds.add(DRAWER_ITEM_HOMEWORK)
|
fragmentIds.add(DRAWER_ITEM_HOMEWORK)
|
||||||
fragmentIds.add(DRAWER_ITEM_NOTICES)
|
fragmentIds.add(DRAWER_ITEM_BEHAVIOUR)
|
||||||
fragmentIds.add(DRAWER_ITEM_ATTENDANCES)
|
fragmentIds.add(DRAWER_ITEM_ATTENDANCE)
|
||||||
return fragmentIds
|
return fragmentIds
|
||||||
}
|
}
|
||||||
LOGIN_TYPE_LIBRUS -> {
|
LOGIN_TYPE_LIBRUS -> {
|
||||||
@ -63,8 +63,8 @@ class ProfileFull : Profile {
|
|||||||
fragmentIds.add(DRAWER_ITEM_GRADES)
|
fragmentIds.add(DRAWER_ITEM_GRADES)
|
||||||
fragmentIds.add(DRAWER_ITEM_MESSAGES)
|
fragmentIds.add(DRAWER_ITEM_MESSAGES)
|
||||||
fragmentIds.add(DRAWER_ITEM_HOMEWORK)
|
fragmentIds.add(DRAWER_ITEM_HOMEWORK)
|
||||||
fragmentIds.add(DRAWER_ITEM_NOTICES)
|
fragmentIds.add(DRAWER_ITEM_BEHAVIOUR)
|
||||||
fragmentIds.add(DRAWER_ITEM_ATTENDANCES)
|
fragmentIds.add(DRAWER_ITEM_ATTENDANCE)
|
||||||
fragmentIds.add(DRAWER_ITEM_ANNOUNCEMENTS)
|
fragmentIds.add(DRAWER_ITEM_ANNOUNCEMENTS)
|
||||||
return fragmentIds
|
return fragmentIds
|
||||||
}
|
}
|
||||||
@ -74,8 +74,8 @@ class ProfileFull : Profile {
|
|||||||
fragmentIds.add(DRAWER_ITEM_AGENDA)
|
fragmentIds.add(DRAWER_ITEM_AGENDA)
|
||||||
fragmentIds.add(DRAWER_ITEM_GRADES)
|
fragmentIds.add(DRAWER_ITEM_GRADES)
|
||||||
fragmentIds.add(DRAWER_ITEM_MESSAGES)
|
fragmentIds.add(DRAWER_ITEM_MESSAGES)
|
||||||
fragmentIds.add(DRAWER_ITEM_NOTICES)
|
fragmentIds.add(DRAWER_ITEM_BEHAVIOUR)
|
||||||
fragmentIds.add(DRAWER_ITEM_ATTENDANCES)
|
fragmentIds.add(DRAWER_ITEM_ATTENDANCE)
|
||||||
fragmentIds.add(DRAWER_ITEM_ANNOUNCEMENTS)
|
fragmentIds.add(DRAWER_ITEM_ANNOUNCEMENTS)
|
||||||
return fragmentIds
|
return fragmentIds
|
||||||
}
|
}
|
||||||
|
@ -27,7 +27,7 @@ import java.util.List;
|
|||||||
|
|
||||||
import pl.szczodrzynski.edziennik.App;
|
import pl.szczodrzynski.edziennik.App;
|
||||||
import pl.szczodrzynski.edziennik.R;
|
import pl.szczodrzynski.edziennik.R;
|
||||||
import pl.szczodrzynski.edziennik.databinding.FragmentRegisterAgendaCalendarBinding;
|
import pl.szczodrzynski.edziennik.databinding.FragmentAgendaCalendarBinding;
|
||||||
import pl.szczodrzynski.edziennik.data.db.modules.events.EventFull;
|
import pl.szczodrzynski.edziennik.data.db.modules.events.EventFull;
|
||||||
import pl.szczodrzynski.edziennik.data.db.modules.lessons.LessonFull;
|
import pl.szczodrzynski.edziennik.data.db.modules.lessons.LessonFull;
|
||||||
import pl.szczodrzynski.edziennik.ui.dialogs.event.EventListDialog;
|
import pl.szczodrzynski.edziennik.ui.dialogs.event.EventListDialog;
|
||||||
@ -36,11 +36,11 @@ import pl.szczodrzynski.edziennik.utils.Themes;
|
|||||||
|
|
||||||
import static pl.szczodrzynski.edziennik.utils.Utils.intToStr;
|
import static pl.szczodrzynski.edziennik.utils.Utils.intToStr;
|
||||||
|
|
||||||
public class RegisterAgendaCalendarFragment extends Fragment {
|
public class AgendaCalendarFragment extends Fragment {
|
||||||
|
|
||||||
private App app = null;
|
private App app = null;
|
||||||
private Activity activity = null;
|
private Activity activity = null;
|
||||||
private FragmentRegisterAgendaCalendarBinding b = null;
|
private FragmentAgendaCalendarBinding b = null;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||||
@ -52,7 +52,7 @@ public class RegisterAgendaCalendarFragment extends Fragment {
|
|||||||
if (app.profile == null)
|
if (app.profile == null)
|
||||||
return inflater.inflate(R.layout.fragment_loading, container, false);
|
return inflater.inflate(R.layout.fragment_loading, container, false);
|
||||||
// activity, context and profile is valid
|
// activity, context and profile is valid
|
||||||
b = DataBindingUtil.inflate(inflater, R.layout.fragment_register_agenda_calendar, container, false);
|
b = DataBindingUtil.inflate(inflater, R.layout.fragment_agenda_calendar, container, false);
|
||||||
return b.getRoot();
|
return b.getRoot();
|
||||||
}
|
}
|
||||||
|
|
@ -36,8 +36,8 @@ import java.util.Locale;
|
|||||||
import pl.szczodrzynski.edziennik.App;
|
import pl.szczodrzynski.edziennik.App;
|
||||||
import pl.szczodrzynski.edziennik.R;
|
import pl.szczodrzynski.edziennik.R;
|
||||||
import pl.szczodrzynski.edziennik.MainActivity;
|
import pl.szczodrzynski.edziennik.MainActivity;
|
||||||
import pl.szczodrzynski.edziennik.databinding.FragmentRegisterAgendaCalendarBinding;
|
import pl.szczodrzynski.edziennik.databinding.FragmentAgendaCalendarBinding;
|
||||||
import pl.szczodrzynski.edziennik.databinding.FragmentRegisterAgendaDefaultBinding;
|
import pl.szczodrzynski.edziennik.databinding.FragmentAgendaDefaultBinding;
|
||||||
import pl.szczodrzynski.edziennik.data.db.modules.events.EventFull;
|
import pl.szczodrzynski.edziennik.data.db.modules.events.EventFull;
|
||||||
import pl.szczodrzynski.edziennik.data.db.modules.lessons.LessonFull;
|
import pl.szczodrzynski.edziennik.data.db.modules.lessons.LessonFull;
|
||||||
import pl.szczodrzynski.edziennik.ui.dialogs.event.EventListDialog;
|
import pl.szczodrzynski.edziennik.ui.dialogs.event.EventListDialog;
|
||||||
@ -55,15 +55,14 @@ import pl.szczodrzynski.navlib.bottomsheet.items.BottomSheetSeparatorItem;
|
|||||||
import static pl.szczodrzynski.edziennik.data.db.modules.metadata.Metadata.TYPE_EVENT;
|
import static pl.szczodrzynski.edziennik.data.db.modules.metadata.Metadata.TYPE_EVENT;
|
||||||
import static pl.szczodrzynski.edziennik.data.db.modules.profiles.Profile.AGENDA_CALENDAR;
|
import static pl.szczodrzynski.edziennik.data.db.modules.profiles.Profile.AGENDA_CALENDAR;
|
||||||
import static pl.szczodrzynski.edziennik.data.db.modules.profiles.Profile.AGENDA_DEFAULT;
|
import static pl.szczodrzynski.edziennik.data.db.modules.profiles.Profile.AGENDA_DEFAULT;
|
||||||
import static pl.szczodrzynski.edziennik.utils.Utils.bs;
|
|
||||||
import static pl.szczodrzynski.edziennik.utils.Utils.intToStr;
|
import static pl.szczodrzynski.edziennik.utils.Utils.intToStr;
|
||||||
|
|
||||||
public class RegisterAgendaDefaultFragment extends Fragment {
|
public class AgendaDefaultFragment extends Fragment {
|
||||||
|
|
||||||
private App app = null;
|
private App app = null;
|
||||||
private MainActivity activity = null;
|
private MainActivity activity = null;
|
||||||
private FragmentRegisterAgendaDefaultBinding b_default = null;
|
private FragmentAgendaDefaultBinding b_default = null;
|
||||||
private FragmentRegisterAgendaCalendarBinding b_calendar = null;
|
private FragmentAgendaCalendarBinding b_calendar = null;
|
||||||
private int viewType = AGENDA_DEFAULT;
|
private int viewType = AGENDA_DEFAULT;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -78,11 +77,11 @@ public class RegisterAgendaDefaultFragment extends Fragment {
|
|||||||
// activity, context and profile is valid
|
// activity, context and profile is valid
|
||||||
viewType = app.profile.getAgendaViewType();
|
viewType = app.profile.getAgendaViewType();
|
||||||
if (viewType == AGENDA_DEFAULT) {
|
if (viewType == AGENDA_DEFAULT) {
|
||||||
b_default = DataBindingUtil.inflate(inflater, R.layout.fragment_register_agenda_default, container, false);
|
b_default = DataBindingUtil.inflate(inflater, R.layout.fragment_agenda_default, container, false);
|
||||||
return b_default.getRoot();
|
return b_default.getRoot();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
b_calendar = DataBindingUtil.inflate(inflater, R.layout.fragment_register_agenda_calendar, container, false);
|
b_calendar = DataBindingUtil.inflate(inflater, R.layout.fragment_agenda_calendar, container, false);
|
||||||
return b_calendar.getRoot();
|
return b_calendar.getRoot();
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -7,30 +7,31 @@ import android.view.View;
|
|||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
|
||||||
import com.afollestad.materialdialogs.MaterialDialog;
|
|
||||||
import com.mikepenz.iconics.typeface.library.community.material.CommunityMaterial;
|
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
import androidx.databinding.DataBindingUtil;
|
import androidx.databinding.DataBindingUtil;
|
||||||
import androidx.fragment.app.Fragment;
|
import androidx.fragment.app.Fragment;
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
|
import com.afollestad.materialdialogs.MaterialDialog;
|
||||||
|
import com.mikepenz.iconics.typeface.library.community.material.CommunityMaterial;
|
||||||
|
|
||||||
import pl.szczodrzynski.edziennik.App;
|
import pl.szczodrzynski.edziennik.App;
|
||||||
import pl.szczodrzynski.edziennik.R;
|
|
||||||
import pl.szczodrzynski.edziennik.MainActivity;
|
import pl.szczodrzynski.edziennik.MainActivity;
|
||||||
|
import pl.szczodrzynski.edziennik.R;
|
||||||
import pl.szczodrzynski.edziennik.databinding.DialogAnnouncementBinding;
|
import pl.szczodrzynski.edziennik.databinding.DialogAnnouncementBinding;
|
||||||
import pl.szczodrzynski.edziennik.databinding.FragmentRegisterSchoolNoticesBinding;
|
import pl.szczodrzynski.edziennik.databinding.FragmentAnnouncementsBinding;
|
||||||
import pl.szczodrzynski.edziennik.utils.Themes;
|
import pl.szczodrzynski.edziennik.utils.Themes;
|
||||||
import pl.szczodrzynski.navlib.bottomsheet.items.BottomSheetPrimaryItem;
|
import pl.szczodrzynski.navlib.bottomsheet.items.BottomSheetPrimaryItem;
|
||||||
|
|
||||||
import static pl.szczodrzynski.edziennik.data.db.modules.metadata.Metadata.TYPE_ANNOUNCEMENT;
|
import static pl.szczodrzynski.edziennik.data.db.modules.metadata.Metadata.TYPE_ANNOUNCEMENT;
|
||||||
|
|
||||||
public class RegisterAnnouncementsFragment extends Fragment {
|
public class AnnouncementsFragment extends Fragment {
|
||||||
|
|
||||||
private App app = null;
|
private App app = null;
|
||||||
private MainActivity activity = null;
|
private MainActivity activity = null;
|
||||||
private FragmentRegisterSchoolNoticesBinding b = null;
|
private FragmentAnnouncementsBinding b = null;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||||
@ -42,7 +43,7 @@ public class RegisterAnnouncementsFragment extends Fragment {
|
|||||||
if (app.profile == null)
|
if (app.profile == null)
|
||||||
return inflater.inflate(R.layout.fragment_loading, container, false);
|
return inflater.inflate(R.layout.fragment_loading, container, false);
|
||||||
// activity, context and profile is valid
|
// activity, context and profile is valid
|
||||||
b = DataBindingUtil.inflate(inflater, R.layout.fragment_register_school_notices, container, false);
|
b = DataBindingUtil.inflate(inflater, R.layout.fragment_announcements, container, false);
|
||||||
b.refreshLayout.setParent(activity.getSwipeRefreshLayout());
|
b.refreshLayout.setParent(activity.getSwipeRefreshLayout());
|
||||||
return b.getRoot();
|
return b.getRoot();
|
||||||
}
|
}
|
@ -24,12 +24,12 @@ import static pl.szczodrzynski.edziennik.data.db.modules.attendance.Attendance.T
|
|||||||
import static pl.szczodrzynski.edziennik.data.db.modules.attendance.Attendance.TYPE_PRESENT;
|
import static pl.szczodrzynski.edziennik.data.db.modules.attendance.Attendance.TYPE_PRESENT;
|
||||||
import static pl.szczodrzynski.edziennik.data.db.modules.attendance.Attendance.TYPE_RELEASED;
|
import static pl.szczodrzynski.edziennik.data.db.modules.attendance.Attendance.TYPE_RELEASED;
|
||||||
|
|
||||||
public class AttendancesAdapter extends RecyclerView.Adapter<AttendancesAdapter.ViewHolder> {
|
public class AttendanceAdapter extends RecyclerView.Adapter<AttendanceAdapter.ViewHolder> {
|
||||||
private Context context;
|
private Context context;
|
||||||
public List<AttendanceFull> attendanceList;
|
public List<AttendanceFull> attendanceList;
|
||||||
|
|
||||||
//getting the context and product list with constructor
|
//getting the context and product list with constructor
|
||||||
public AttendancesAdapter(Context mCtx, List<AttendanceFull> noticeList) {
|
public AttendanceAdapter(Context mCtx, List<AttendanceFull> noticeList) {
|
||||||
this.context = mCtx;
|
this.context = mCtx;
|
||||||
this.attendanceList = noticeList;
|
this.attendanceList = noticeList;
|
||||||
}
|
}
|
@ -1,18 +1,8 @@
|
|||||||
package pl.szczodrzynski.edziennik.ui.modules.attendance;
|
package pl.szczodrzynski.edziennik.ui.modules.attendance;
|
||||||
|
|
||||||
import androidx.appcompat.widget.PopupMenu;
|
|
||||||
import androidx.databinding.DataBindingUtil;
|
|
||||||
|
|
||||||
import android.graphics.Color;
|
import android.graphics.Color;
|
||||||
import android.os.AsyncTask;
|
import android.os.AsyncTask;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
|
||||||
import androidx.annotation.Nullable;
|
|
||||||
import androidx.fragment.app.Fragment;
|
|
||||||
import androidx.core.graphics.ColorUtils;
|
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
|
||||||
|
|
||||||
import android.os.Handler;
|
import android.os.Handler;
|
||||||
import android.util.LongSparseArray;
|
import android.util.LongSparseArray;
|
||||||
import android.view.Gravity;
|
import android.view.Gravity;
|
||||||
@ -24,6 +14,14 @@ import android.view.animation.Animation;
|
|||||||
import android.view.animation.Transformation;
|
import android.view.animation.Transformation;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.annotation.Nullable;
|
||||||
|
import androidx.appcompat.widget.PopupMenu;
|
||||||
|
import androidx.core.graphics.ColorUtils;
|
||||||
|
import androidx.databinding.DataBindingUtil;
|
||||||
|
import androidx.fragment.app.Fragment;
|
||||||
|
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||||
|
|
||||||
import com.danimahardhika.cafebar.CafeBar;
|
import com.danimahardhika.cafebar.CafeBar;
|
||||||
import com.mikepenz.iconics.IconicsColor;
|
import com.mikepenz.iconics.IconicsColor;
|
||||||
import com.mikepenz.iconics.IconicsDrawable;
|
import com.mikepenz.iconics.IconicsDrawable;
|
||||||
@ -37,14 +35,14 @@ import java.util.Locale;
|
|||||||
|
|
||||||
import antonkozyriatskyi.circularprogressindicator.CircularProgressIndicator;
|
import antonkozyriatskyi.circularprogressindicator.CircularProgressIndicator;
|
||||||
import pl.szczodrzynski.edziennik.App;
|
import pl.szczodrzynski.edziennik.App;
|
||||||
import pl.szczodrzynski.edziennik.R;
|
|
||||||
import pl.szczodrzynski.edziennik.MainActivity;
|
import pl.szczodrzynski.edziennik.MainActivity;
|
||||||
import pl.szczodrzynski.edziennik.databinding.FragmentRegisterAttendancesBinding;
|
import pl.szczodrzynski.edziennik.R;
|
||||||
import pl.szczodrzynski.edziennik.data.db.modules.attendance.AttendanceFull;
|
import pl.szczodrzynski.edziennik.data.db.modules.attendance.AttendanceFull;
|
||||||
import pl.szczodrzynski.edziennik.data.db.modules.subjects.Subject;
|
import pl.szczodrzynski.edziennik.data.db.modules.subjects.Subject;
|
||||||
|
import pl.szczodrzynski.edziennik.databinding.FragmentAttendanceBinding;
|
||||||
|
import pl.szczodrzynski.edziennik.utils.Themes;
|
||||||
import pl.szczodrzynski.edziennik.utils.models.Date;
|
import pl.szczodrzynski.edziennik.utils.models.Date;
|
||||||
import pl.szczodrzynski.edziennik.utils.models.Week;
|
import pl.szczodrzynski.edziennik.utils.models.Week;
|
||||||
import pl.szczodrzynski.edziennik.utils.Themes;
|
|
||||||
import pl.szczodrzynski.navlib.bottomsheet.items.BottomSheetPrimaryItem;
|
import pl.szczodrzynski.navlib.bottomsheet.items.BottomSheetPrimaryItem;
|
||||||
|
|
||||||
import static pl.szczodrzynski.edziennik.data.db.modules.attendance.Attendance.TYPE_ABSENT;
|
import static pl.szczodrzynski.edziennik.data.db.modules.attendance.Attendance.TYPE_ABSENT;
|
||||||
@ -57,11 +55,11 @@ import static pl.szczodrzynski.edziennik.data.db.modules.login.LoginStore.LOGIN_
|
|||||||
import static pl.szczodrzynski.edziennik.data.db.modules.login.LoginStore.LOGIN_TYPE_VULCAN;
|
import static pl.szczodrzynski.edziennik.data.db.modules.login.LoginStore.LOGIN_TYPE_VULCAN;
|
||||||
import static pl.szczodrzynski.edziennik.data.db.modules.metadata.Metadata.TYPE_ATTENDANCE;
|
import static pl.szczodrzynski.edziennik.data.db.modules.metadata.Metadata.TYPE_ATTENDANCE;
|
||||||
|
|
||||||
public class RegisterAttendancesFragment extends Fragment {
|
public class AttendanceFragment extends Fragment {
|
||||||
|
|
||||||
private App app = null;
|
private App app = null;
|
||||||
private MainActivity activity = null;
|
private MainActivity activity = null;
|
||||||
private FragmentRegisterAttendancesBinding b = null;
|
private FragmentAttendanceBinding b = null;
|
||||||
|
|
||||||
private int displayMode = MODE_YEAR;
|
private int displayMode = MODE_YEAR;
|
||||||
private static final int MODE_YEAR = 0;
|
private static final int MODE_YEAR = 0;
|
||||||
@ -84,7 +82,7 @@ public class RegisterAttendancesFragment extends Fragment {
|
|||||||
if (app.profile == null)
|
if (app.profile == null)
|
||||||
return inflater.inflate(R.layout.fragment_loading, container, false);
|
return inflater.inflate(R.layout.fragment_loading, container, false);
|
||||||
// activity, context and profile is valid
|
// activity, context and profile is valid
|
||||||
b = DataBindingUtil.inflate(inflater, R.layout.fragment_register_attendances, container, false);
|
b = DataBindingUtil.inflate(inflater, R.layout.fragment_attendance, container, false);
|
||||||
b.refreshLayout.setParent(activity.getSwipeRefreshLayout());
|
b.refreshLayout.setParent(activity.getSwipeRefreshLayout());
|
||||||
return b.getRoot();
|
return b.getRoot();
|
||||||
}
|
}
|
||||||
@ -106,14 +104,14 @@ public class RegisterAttendancesFragment extends Fragment {
|
|||||||
);
|
);
|
||||||
|
|
||||||
/*b.refreshLayout.setOnRefreshListener(() -> {
|
/*b.refreshLayout.setOnRefreshListener(() -> {
|
||||||
activity.syncCurrentFeature(MainActivity.DRAWER_ITEM_ATTENDANCES, b.refreshLayout);
|
activity.syncCurrentFeature(MainActivity.DRAWER_ITEM_ATTENDANCE, b.refreshLayout);
|
||||||
});*/
|
});*/
|
||||||
|
|
||||||
b.attendancePercentage.setProgressTextAdapter(PERCENTAGE_ADAPTER);
|
b.attendancePercentage.setProgressTextAdapter(PERCENTAGE_ADAPTER);
|
||||||
b.attendancePercentage.setMaxProgress(100.0f);
|
b.attendancePercentage.setMaxProgress(100.0f);
|
||||||
|
|
||||||
b.attendancesSummaryTitle.setOnClickListener((v -> {
|
b.attendanceSummaryTitle.setOnClickListener((v -> {
|
||||||
PopupMenu popupMenu = new PopupMenu(activity, b.attendancesSummaryTitle, Gravity.END);
|
PopupMenu popupMenu = new PopupMenu(activity, b.attendanceSummaryTitle, Gravity.END);
|
||||||
popupMenu.getMenu().add(0, 0, 0, R.string.summary_mode_year);
|
popupMenu.getMenu().add(0, 0, 0, R.string.summary_mode_year);
|
||||||
popupMenu.getMenu().add(0, 1, 1, R.string.summary_mode_semester_1);
|
popupMenu.getMenu().add(0, 1, 1, R.string.summary_mode_semester_1);
|
||||||
popupMenu.getMenu().add(0, 2, 2, R.string.summary_mode_semester_2);
|
popupMenu.getMenu().add(0, 2, 2, R.string.summary_mode_semester_2);
|
||||||
@ -126,11 +124,11 @@ public class RegisterAttendancesFragment extends Fragment {
|
|||||||
}));
|
}));
|
||||||
|
|
||||||
if (app.profile.getLoginStoreType() == LOGIN_TYPE_MOBIDZIENNIK) {
|
if (app.profile.getLoginStoreType() == LOGIN_TYPE_MOBIDZIENNIK) {
|
||||||
long attendancesLastSync = app.profile.getStudentData("attendancesLastSync", (long)0);
|
long attendanceLastSync = app.profile.getStudentData("attendanceLastSync", (long)0);
|
||||||
if (attendancesLastSync == 0) {
|
if (attendanceLastSync == 0) {
|
||||||
attendancesLastSync = app.profile.getSemesterStart(1).getInMillis();
|
attendanceLastSync = app.profile.getSemesterStart(1).getInMillis();
|
||||||
}
|
}
|
||||||
Date lastSyncDate = Date.fromMillis(attendancesLastSync);
|
Date lastSyncDate = Date.fromMillis(attendanceLastSync);
|
||||||
if (lastSyncDate.getValue() < Week.getWeekStart().getValue()) {
|
if (lastSyncDate.getValue() < Week.getWeekStart().getValue()) {
|
||||||
CafeBar.builder(activity)
|
CafeBar.builder(activity)
|
||||||
.to(activity.getNavView().getCoordinator())
|
.to(activity.getNavView().getCoordinator())
|
||||||
@ -158,13 +156,13 @@ public class RegisterAttendancesFragment extends Fragment {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (app.profile.getLoginStoreType() == LOGIN_TYPE_MOBIDZIENNIK && false) {
|
if (app.profile.getLoginStoreType() == LOGIN_TYPE_MOBIDZIENNIK && false) {
|
||||||
b.attendancesSummarySubject.setVisibility(View.GONE);
|
b.attendanceSummarySubject.setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
b.attendancesSummarySubject.setOnClickListener((v -> {
|
b.attendanceSummarySubject.setOnClickListener((v -> {
|
||||||
AsyncTask.execute(() -> {
|
AsyncTask.execute(() -> {
|
||||||
List<Subject> subjectList = app.db.subjectDao().getAllNow(App.profileId);
|
List<Subject> subjectList = app.db.subjectDao().getAllNow(App.profileId);
|
||||||
PopupMenu popupMenu = new PopupMenu(activity, b.attendancesSummarySubject, Gravity.END);
|
PopupMenu popupMenu = new PopupMenu(activity, b.attendanceSummarySubject, Gravity.END);
|
||||||
popupMenu.getMenu().add(0, -1, 0, R.string.subject_filter_disabled);
|
popupMenu.getMenu().add(0, -1, 0, R.string.subject_filter_disabled);
|
||||||
int index = 0;
|
int index = 0;
|
||||||
DecimalFormat format = new DecimalFormat("0.00");
|
DecimalFormat format = new DecimalFormat("0.00");
|
||||||
@ -180,7 +178,7 @@ public class RegisterAttendancesFragment extends Fragment {
|
|||||||
}
|
}
|
||||||
popupMenu.setOnMenuItemClickListener((item -> {
|
popupMenu.setOnMenuItemClickListener((item -> {
|
||||||
subjectIdFilter = item.getItemId();
|
subjectIdFilter = item.getItemId();
|
||||||
b.attendancesSummarySubject.setText(item.getTitle().toString().replaceAll("\\s-\\s[0-9]{1,2}\\.[0-9]{1,2}%", ""));
|
b.attendanceSummarySubject.setText(item.getTitle().toString().replaceAll("\\s-\\s[0-9]{1,2}\\.[0-9]{1,2}%", ""));
|
||||||
updateList();
|
updateList();
|
||||||
return true;
|
return true;
|
||||||
}));
|
}));
|
||||||
@ -192,20 +190,20 @@ public class RegisterAttendancesFragment extends Fragment {
|
|||||||
|
|
||||||
LinearLayoutManager linearLayoutManager = new LinearLayoutManager(getContext());
|
LinearLayoutManager linearLayoutManager = new LinearLayoutManager(getContext());
|
||||||
|
|
||||||
b.attendancesView.setHasFixedSize(true);
|
b.attendanceView.setHasFixedSize(true);
|
||||||
b.attendancesView.setLayoutManager(linearLayoutManager);
|
b.attendanceView.setLayoutManager(linearLayoutManager);
|
||||||
|
|
||||||
app.db.attendanceDao().getAll(App.profileId).observe(this, attendances -> {
|
app.db.attendanceDao().getAll(App.profileId).observe(this, attendance -> {
|
||||||
if (app == null || app.profile == null || activity == null || b == null || !isAdded())
|
if (app == null || app.profile == null || activity == null || b == null || !isAdded())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (attendances == null) {
|
if (attendance == null) {
|
||||||
b.attendancesView.setVisibility(View.GONE);
|
b.attendanceView.setVisibility(View.GONE);
|
||||||
b.attendancesNoData.setVisibility(View.VISIBLE);
|
b.attendanceNoData.setVisibility(View.VISIBLE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
attendanceList = attendances;
|
attendanceList = attendance;
|
||||||
|
|
||||||
countSubjectStats();
|
countSubjectStats();
|
||||||
|
|
||||||
@ -274,29 +272,29 @@ public class RegisterAttendancesFragment extends Fragment {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (filteredList.size() > 0) {
|
if (filteredList.size() > 0) {
|
||||||
AttendancesAdapter adapter;
|
AttendanceAdapter adapter;
|
||||||
b.attendancesView.setVisibility(View.VISIBLE);
|
b.attendanceView.setVisibility(View.VISIBLE);
|
||||||
b.attendancesNoData.setVisibility(View.GONE);
|
b.attendanceNoData.setVisibility(View.GONE);
|
||||||
if ((adapter = (AttendancesAdapter) b.attendancesView.getAdapter()) != null) {
|
if ((adapter = (AttendanceAdapter) b.attendanceView.getAdapter()) != null) {
|
||||||
adapter.attendanceList = filteredList;
|
adapter.attendanceList = filteredList;
|
||||||
adapter.notifyDataSetChanged();
|
adapter.notifyDataSetChanged();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
adapter = new AttendancesAdapter(getContext(), filteredList);
|
adapter = new AttendanceAdapter(getContext(), filteredList);
|
||||||
b.attendancesView.setAdapter(adapter);
|
b.attendanceView.setAdapter(adapter);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
b.attendancesView.setVisibility(View.GONE);
|
b.attendanceView.setVisibility(View.GONE);
|
||||||
b.attendancesNoData.setVisibility(View.VISIBLE);
|
b.attendanceNoData.setVisibility(View.VISIBLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
// SUMMARY
|
// SUMMARY
|
||||||
if (displayMode == MODE_YEAR) {
|
if (displayMode == MODE_YEAR) {
|
||||||
b.attendancesSummaryTitle.setText(getString(R.string.attendances_summary_title_year));
|
b.attendanceSummaryTitle.setText(getString(R.string.attendance_summary_title_year));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
b.attendancesSummaryTitle.setText(getString(R.string.attendances_summary_title_semester_format, displayMode));
|
b.attendanceSummaryTitle.setText(getString(R.string.attendance_summary_title_semester_format, displayMode));
|
||||||
}
|
}
|
||||||
b.presentCountContainer.setVisibility(presentCount == 0 ? View.GONE : View.VISIBLE);
|
b.presentCountContainer.setVisibility(presentCount == 0 ? View.GONE : View.VISIBLE);
|
||||||
b.presentCount.setText(String.format(Locale.getDefault(), "%d", presentCount));
|
b.presentCount.setText(String.format(Locale.getDefault(), "%d", presentCount));
|
@ -1,4 +1,4 @@
|
|||||||
package pl.szczodrzynski.edziennik.ui.modules.notices;
|
package pl.szczodrzynski.edziennik.ui.modules.behaviour;
|
||||||
|
|
||||||
import android.graphics.Color;
|
import android.graphics.Color;
|
||||||
import android.os.AsyncTask;
|
import android.os.AsyncTask;
|
||||||
@ -9,10 +9,6 @@ import android.view.View;
|
|||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Locale;
|
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
import androidx.appcompat.widget.PopupMenu;
|
import androidx.appcompat.widget.PopupMenu;
|
||||||
@ -22,22 +18,26 @@ import androidx.recyclerview.widget.LinearLayoutManager;
|
|||||||
|
|
||||||
import com.mikepenz.iconics.typeface.library.community.material.CommunityMaterial;
|
import com.mikepenz.iconics.typeface.library.community.material.CommunityMaterial;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Locale;
|
||||||
|
|
||||||
import pl.szczodrzynski.edziennik.App;
|
import pl.szczodrzynski.edziennik.App;
|
||||||
import pl.szczodrzynski.edziennik.R;
|
|
||||||
import pl.szczodrzynski.edziennik.MainActivity;
|
import pl.szczodrzynski.edziennik.MainActivity;
|
||||||
import pl.szczodrzynski.edziennik.databinding.FragmentRegisterNoticesBinding;
|
import pl.szczodrzynski.edziennik.R;
|
||||||
import pl.szczodrzynski.edziennik.data.db.modules.notices.Notice;
|
import pl.szczodrzynski.edziennik.data.db.modules.notices.Notice;
|
||||||
import pl.szczodrzynski.edziennik.data.db.modules.notices.NoticeFull;
|
import pl.szczodrzynski.edziennik.data.db.modules.notices.NoticeFull;
|
||||||
|
import pl.szczodrzynski.edziennik.databinding.FragmentBehaviourBinding;
|
||||||
import pl.szczodrzynski.edziennik.utils.Themes;
|
import pl.szczodrzynski.edziennik.utils.Themes;
|
||||||
import pl.szczodrzynski.navlib.bottomsheet.items.BottomSheetPrimaryItem;
|
import pl.szczodrzynski.navlib.bottomsheet.items.BottomSheetPrimaryItem;
|
||||||
|
|
||||||
import static pl.szczodrzynski.edziennik.data.db.modules.metadata.Metadata.TYPE_NOTICE;
|
import static pl.szczodrzynski.edziennik.data.db.modules.metadata.Metadata.TYPE_NOTICE;
|
||||||
|
|
||||||
public class RegisterNoticesFragment extends Fragment {
|
public class BehaviourFragment extends Fragment {
|
||||||
|
|
||||||
private App app = null;
|
private App app = null;
|
||||||
private MainActivity activity = null;
|
private MainActivity activity = null;
|
||||||
private FragmentRegisterNoticesBinding b = null;
|
private FragmentBehaviourBinding b = null;
|
||||||
|
|
||||||
private int displayMode = MODE_YEAR;
|
private int displayMode = MODE_YEAR;
|
||||||
private static final int MODE_YEAR = 0;
|
private static final int MODE_YEAR = 0;
|
||||||
@ -56,7 +56,7 @@ public class RegisterNoticesFragment extends Fragment {
|
|||||||
if (app.profile == null)
|
if (app.profile == null)
|
||||||
return inflater.inflate(R.layout.fragment_loading, container, false);
|
return inflater.inflate(R.layout.fragment_loading, container, false);
|
||||||
// activity, context and profile is valid
|
// activity, context and profile is valid
|
||||||
b = DataBindingUtil.inflate(inflater, R.layout.fragment_register_notices, container, false);
|
b = DataBindingUtil.inflate(inflater, R.layout.fragment_behaviour, container, false);
|
||||||
b.refreshLayout.setParent(activity.getSwipeRefreshLayout());
|
b.refreshLayout.setParent(activity.getSwipeRefreshLayout());
|
||||||
return b.getRoot();
|
return b.getRoot();
|
||||||
}
|
}
|
||||||
@ -78,7 +78,7 @@ public class RegisterNoticesFragment extends Fragment {
|
|||||||
);
|
);
|
||||||
|
|
||||||
/*b.refreshLayout.setOnRefreshListener(() -> {
|
/*b.refreshLayout.setOnRefreshListener(() -> {
|
||||||
activity.syncCurrentFeature(MainActivity.DRAWER_ITEM_NOTICES, b.refreshLayout);
|
activity.syncCurrentFeature(MainActivity.DRAWER_ITEM_BEHAVIOUR, b.refreshLayout);
|
||||||
});*/
|
});*/
|
||||||
|
|
||||||
b.noticesSummaryTitle.setOnClickListener((v -> {
|
b.noticesSummaryTitle.setOnClickListener((v -> {
|
@ -1,4 +1,4 @@
|
|||||||
package pl.szczodrzynski.edziennik.ui.modules.notices
|
package pl.szczodrzynski.edziennik.ui.modules.behaviour
|
||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.graphics.PorterDuff
|
import android.graphics.PorterDuff
|
@ -21,14 +21,14 @@ import java.util.ArrayList;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import pl.szczodrzynski.edziennik.App;
|
import pl.szczodrzynski.edziennik.App;
|
||||||
import pl.szczodrzynski.edziennik.R;
|
|
||||||
import pl.szczodrzynski.edziennik.MainActivity;
|
import pl.szczodrzynski.edziennik.MainActivity;
|
||||||
import pl.szczodrzynski.edziennik.databinding.FragmentRegisterGradesBinding;
|
import pl.szczodrzynski.edziennik.R;
|
||||||
import pl.szczodrzynski.edziennik.data.db.modules.grades.Grade;
|
import pl.szczodrzynski.edziennik.data.db.modules.grades.Grade;
|
||||||
import pl.szczodrzynski.edziennik.data.db.modules.grades.GradeFull;
|
import pl.szczodrzynski.edziennik.data.db.modules.grades.GradeFull;
|
||||||
import pl.szczodrzynski.edziennik.data.db.modules.subjects.Subject;
|
import pl.szczodrzynski.edziennik.data.db.modules.subjects.Subject;
|
||||||
import pl.szczodrzynski.edziennik.utils.models.ItemGradesSubjectModel;
|
import pl.szczodrzynski.edziennik.databinding.FragmentGradesBinding;
|
||||||
import pl.szczodrzynski.edziennik.utils.Themes;
|
import pl.szczodrzynski.edziennik.utils.Themes;
|
||||||
|
import pl.szczodrzynski.edziennik.utils.models.ItemGradesSubjectModel;
|
||||||
import pl.szczodrzynski.navlib.bottomsheet.items.BottomSheetPrimaryItem;
|
import pl.szczodrzynski.navlib.bottomsheet.items.BottomSheetPrimaryItem;
|
||||||
import pl.szczodrzynski.navlib.bottomsheet.items.BottomSheetSeparatorItem;
|
import pl.szczodrzynski.navlib.bottomsheet.items.BottomSheetSeparatorItem;
|
||||||
|
|
||||||
@ -42,11 +42,11 @@ import static pl.szczodrzynski.edziennik.utils.models.AppConfig.ORDER_BY_DATE_AS
|
|||||||
import static pl.szczodrzynski.edziennik.utils.models.AppConfig.ORDER_BY_DATE_DESC;
|
import static pl.szczodrzynski.edziennik.utils.models.AppConfig.ORDER_BY_DATE_DESC;
|
||||||
import static pl.szczodrzynski.edziennik.utils.models.AppConfig.ORDER_BY_SUBJECT_ASC;
|
import static pl.szczodrzynski.edziennik.utils.models.AppConfig.ORDER_BY_SUBJECT_ASC;
|
||||||
|
|
||||||
public class RegisterGradesFragment extends Fragment {
|
public class GradesFragment extends Fragment {
|
||||||
|
|
||||||
private App app = null;
|
private App app = null;
|
||||||
private MainActivity activity = null;
|
private MainActivity activity = null;
|
||||||
private FragmentRegisterGradesBinding b = null;
|
private FragmentGradesBinding b = null;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||||
@ -58,7 +58,7 @@ public class RegisterGradesFragment extends Fragment {
|
|||||||
if (app.profile == null)
|
if (app.profile == null)
|
||||||
return inflater.inflate(R.layout.fragment_loading, container, false);
|
return inflater.inflate(R.layout.fragment_loading, container, false);
|
||||||
// activity, context and profile is valid
|
// activity, context and profile is valid
|
||||||
b = DataBindingUtil.inflate(inflater, R.layout.fragment_register_grades, container, false);
|
b = DataBindingUtil.inflate(inflater, R.layout.fragment_grades, container, false);
|
||||||
b.refreshLayout.setParent(activity.getSwipeRefreshLayout());
|
b.refreshLayout.setParent(activity.getSwipeRefreshLayout());
|
||||||
b.refreshLayout.setNestedScrollingEnabled(true);
|
b.refreshLayout.setNestedScrollingEnabled(true);
|
||||||
return b.getRoot();
|
return b.getRoot();
|
@ -35,14 +35,14 @@ import java.util.List;
|
|||||||
|
|
||||||
import pl.szczodrzynski.edziennik.App;
|
import pl.szczodrzynski.edziennik.App;
|
||||||
import pl.szczodrzynski.edziennik.R;
|
import pl.szczodrzynski.edziennik.R;
|
||||||
import pl.szczodrzynski.edziennik.data.api.Edziennik;
|
|
||||||
import pl.szczodrzynski.edziennik.data.api.AppError;
|
import pl.szczodrzynski.edziennik.data.api.AppError;
|
||||||
|
import pl.szczodrzynski.edziennik.data.api.Edziennik;
|
||||||
import pl.szczodrzynski.edziennik.data.api.interfaces.SyncCallback;
|
import pl.szczodrzynski.edziennik.data.api.interfaces.SyncCallback;
|
||||||
import pl.szczodrzynski.edziennik.databinding.MessagesComposeActivityBinding;
|
|
||||||
import pl.szczodrzynski.edziennik.data.db.modules.login.LoginStore;
|
import pl.szczodrzynski.edziennik.data.db.modules.login.LoginStore;
|
||||||
import pl.szczodrzynski.edziennik.data.db.modules.profiles.Profile;
|
import pl.szczodrzynski.edziennik.data.db.modules.profiles.Profile;
|
||||||
import pl.szczodrzynski.edziennik.data.db.modules.profiles.ProfileFull;
|
import pl.szczodrzynski.edziennik.data.db.modules.profiles.ProfileFull;
|
||||||
import pl.szczodrzynski.edziennik.data.db.modules.teachers.Teacher;
|
import pl.szczodrzynski.edziennik.data.db.modules.teachers.Teacher;
|
||||||
|
import pl.szczodrzynski.edziennik.databinding.ActivityComposeMessageBinding;
|
||||||
import pl.szczodrzynski.edziennik.utils.Colors;
|
import pl.szczodrzynski.edziennik.utils.Colors;
|
||||||
import pl.szczodrzynski.edziennik.utils.Themes;
|
import pl.szczodrzynski.edziennik.utils.Themes;
|
||||||
|
|
||||||
@ -50,7 +50,7 @@ public class MessagesComposeActivity extends AppCompatActivity {
|
|||||||
|
|
||||||
private static final String TAG = "MessageCompose";
|
private static final String TAG = "MessageCompose";
|
||||||
private App app;
|
private App app;
|
||||||
private MessagesComposeActivityBinding b;
|
private ActivityComposeMessageBinding b;
|
||||||
private List<Teacher> teachers = new ArrayList<>();
|
private List<Teacher> teachers = new ArrayList<>();
|
||||||
private ActionBar actionBar;
|
private ActionBar actionBar;
|
||||||
private MessagesComposeInfo composeInfo;
|
private MessagesComposeInfo composeInfo;
|
||||||
@ -60,7 +60,7 @@ public class MessagesComposeActivity extends AppCompatActivity {
|
|||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
app = (App)getApplication();
|
app = (App)getApplication();
|
||||||
setTheme(Themes.INSTANCE.getAppTheme());
|
setTheme(Themes.INSTANCE.getAppTheme());
|
||||||
b = DataBindingUtil.inflate(getLayoutInflater(), R.layout.messages_compose_activity, null, false);
|
b = DataBindingUtil.inflate(getLayoutInflater(), R.layout.activity_compose_message, null, false);
|
||||||
setContentView(b.getRoot());
|
setContentView(b.getRoot());
|
||||||
|
|
||||||
composeInfo = Edziennik.getApi(app, app.profile.getLoginStoreType()).getComposeInfo(app.profile);
|
composeInfo = Edziennik.getApi(app, app.profile.getLoginStoreType()).getComposeInfo(app.profile);
|
||||||
|
@ -17,12 +17,6 @@ import android.os.Bundle;
|
|||||||
import android.os.Environment;
|
import android.os.Environment;
|
||||||
import android.os.Handler;
|
import android.os.Handler;
|
||||||
import android.provider.MediaStore;
|
import android.provider.MediaStore;
|
||||||
import androidx.annotation.NonNull;
|
|
||||||
import androidx.annotation.Nullable;
|
|
||||||
import androidx.core.app.ActivityCompat;
|
|
||||||
import androidx.databinding.DataBindingUtil;
|
|
||||||
import androidx.fragment.app.Fragment;
|
|
||||||
import androidx.core.content.FileProvider;
|
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
@ -39,6 +33,13 @@ import android.widget.ProgressBar;
|
|||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.annotation.Nullable;
|
||||||
|
import androidx.core.app.ActivityCompat;
|
||||||
|
import androidx.core.content.FileProvider;
|
||||||
|
import androidx.databinding.DataBindingUtil;
|
||||||
|
import androidx.fragment.app.Fragment;
|
||||||
|
|
||||||
import com.afollestad.materialdialogs.MaterialDialog;
|
import com.afollestad.materialdialogs.MaterialDialog;
|
||||||
import com.afollestad.materialdialogs.StackingBehavior;
|
import com.afollestad.materialdialogs.StackingBehavior;
|
||||||
|
|
||||||
@ -51,7 +52,7 @@ import java.util.Date;
|
|||||||
|
|
||||||
import pl.szczodrzynski.edziennik.App;
|
import pl.szczodrzynski.edziennik.App;
|
||||||
import pl.szczodrzynski.edziennik.R;
|
import pl.szczodrzynski.edziennik.R;
|
||||||
import pl.szczodrzynski.edziennik.databinding.FragmentRegisterMessagesWebBinding;
|
import pl.szczodrzynski.edziennik.databinding.FragmentMessagesWebBinding;
|
||||||
import pl.szczodrzynski.edziennik.utils.Anim;
|
import pl.szczodrzynski.edziennik.utils.Anim;
|
||||||
import pl.szczodrzynski.edziennik.utils.Themes;
|
import pl.szczodrzynski.edziennik.utils.Themes;
|
||||||
|
|
||||||
@ -59,12 +60,12 @@ import static android.app.Activity.RESULT_OK;
|
|||||||
import static android.content.Context.DOWNLOAD_SERVICE;
|
import static android.content.Context.DOWNLOAD_SERVICE;
|
||||||
import static pl.szczodrzynski.edziennik.utils.Utils.readableFileSize;
|
import static pl.szczodrzynski.edziennik.utils.Utils.readableFileSize;
|
||||||
|
|
||||||
public class RegisterMessagesWebFragment extends Fragment {
|
public class MessagesWebFragment extends Fragment {
|
||||||
|
|
||||||
private static final String TAG = "RegisterMessagesWeb";
|
private static final String TAG = "RegisterMessagesWeb";
|
||||||
private App app = null;
|
private App app = null;
|
||||||
private Activity activity = null;
|
private Activity activity = null;
|
||||||
private FragmentRegisterMessagesWebBinding b = null;
|
private FragmentMessagesWebBinding b = null;
|
||||||
|
|
||||||
private WebView webView;
|
private WebView webView;
|
||||||
private ProgressBar progressBar;
|
private ProgressBar progressBar;
|
||||||
@ -80,7 +81,7 @@ public class RegisterMessagesWebFragment extends Fragment {
|
|||||||
if (app.profile == null)
|
if (app.profile == null)
|
||||||
return inflater.inflate(R.layout.fragment_loading, container, false);
|
return inflater.inflate(R.layout.fragment_loading, container, false);
|
||||||
// activity, context and profile is valid
|
// activity, context and profile is valid
|
||||||
b = DataBindingUtil.inflate(inflater, R.layout.fragment_register_messages_web, container, false);
|
b = DataBindingUtil.inflate(inflater, R.layout.fragment_messages_web, container, false);
|
||||||
return b.getRoot();
|
return b.getRoot();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -350,7 +351,7 @@ public class RegisterMessagesWebFragment extends Fragment {
|
|||||||
@Override
|
@Override
|
||||||
public void onPageStarted(WebView view, String url, Bitmap favicon) {
|
public void onPageStarted(WebView view, String url, Bitmap favicon) {
|
||||||
super.onPageStarted(view, url, favicon);
|
super.onPageStarted(view, url, favicon);
|
||||||
RegisterMessagesWebFragment.this.error.setVisibility(View.GONE);
|
MessagesWebFragment.this.error.setVisibility(View.GONE);
|
||||||
loadingFinished = false;
|
loadingFinished = false;
|
||||||
//SHOW LOADING IF IT ISNT ALREADY VISIBLE
|
//SHOW LOADING IF IT ISNT ALREADY VISIBLE
|
||||||
if (progressBar.getVisibility() != View.VISIBLE)
|
if (progressBar.getVisibility() != View.VISIBLE)
|
||||||
@ -385,8 +386,8 @@ public class RegisterMessagesWebFragment extends Fragment {
|
|||||||
if (app == null || app.profile == null || activity == null || b == null || !isAdded())
|
if (app == null || app.profile == null || activity == null || b == null || !isAdded())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
RegisterMessagesWebFragment.this.error.setVisibility(View.VISIBLE);
|
MessagesWebFragment.this.error.setVisibility(View.VISIBLE);
|
||||||
RegisterMessagesWebFragment.this.error.setText(getString(R.string.error_occured_format, error.toString()));
|
MessagesWebFragment.this.error.setText(getString(R.string.error_occured_format, error.toString()));
|
||||||
super.onReceivedError(view, request, error);
|
super.onReceivedError(view, request, error);
|
||||||
}
|
}
|
||||||
});
|
});
|
@ -2,26 +2,27 @@ package pl.szczodrzynski.edziennik.ui.modules.notifications;
|
|||||||
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
import androidx.databinding.DataBindingUtil;
|
import androidx.databinding.DataBindingUtil;
|
||||||
import androidx.fragment.app.Fragment;
|
import androidx.fragment.app.Fragment;
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
import android.view.LayoutInflater;
|
|
||||||
import android.view.View;
|
|
||||||
import android.view.ViewGroup;
|
|
||||||
|
|
||||||
import pl.szczodrzynski.edziennik.App;
|
import pl.szczodrzynski.edziennik.App;
|
||||||
import pl.szczodrzynski.edziennik.R;
|
import pl.szczodrzynski.edziennik.R;
|
||||||
import pl.szczodrzynski.edziennik.databinding.FragmentRegisterNotificationsBinding;
|
import pl.szczodrzynski.edziennik.databinding.FragmentNotificationsBinding;
|
||||||
import pl.szczodrzynski.edziennik.utils.Themes;
|
import pl.szczodrzynski.edziennik.utils.Themes;
|
||||||
|
|
||||||
public class RegisterNotificationsFragment extends Fragment {
|
public class NotificationsFragment extends Fragment {
|
||||||
|
|
||||||
private App app = null;
|
private App app = null;
|
||||||
private Activity activity = null;
|
private Activity activity = null;
|
||||||
private FragmentRegisterNotificationsBinding b = null;
|
private FragmentNotificationsBinding b = null;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||||
@ -33,7 +34,7 @@ public class RegisterNotificationsFragment extends Fragment {
|
|||||||
if (app.profile == null)
|
if (app.profile == null)
|
||||||
return inflater.inflate(R.layout.fragment_loading, container, false);
|
return inflater.inflate(R.layout.fragment_loading, container, false);
|
||||||
// activity, context and profile is valid
|
// activity, context and profile is valid
|
||||||
b = DataBindingUtil.inflate(inflater, R.layout.fragment_register_notifications, container, false);
|
b = DataBindingUtil.inflate(inflater, R.layout.fragment_notifications, container, false);
|
||||||
return b.getRoot();
|
return b.getRoot();
|
||||||
}
|
}
|
||||||
|
|
@ -351,8 +351,8 @@ public class SettingsNewFragment extends MaterialAboutFragment {
|
|||||||
buttonIds.add(MainActivity.DRAWER_ITEM_GRADES);
|
buttonIds.add(MainActivity.DRAWER_ITEM_GRADES);
|
||||||
buttonIds.add(MainActivity.DRAWER_ITEM_MESSAGES);
|
buttonIds.add(MainActivity.DRAWER_ITEM_MESSAGES);
|
||||||
buttonIds.add(MainActivity.DRAWER_ITEM_HOMEWORK);
|
buttonIds.add(MainActivity.DRAWER_ITEM_HOMEWORK);
|
||||||
buttonIds.add(MainActivity.DRAWER_ITEM_NOTICES);
|
buttonIds.add(MainActivity.DRAWER_ITEM_BEHAVIOUR);
|
||||||
buttonIds.add(MainActivity.DRAWER_ITEM_ATTENDANCES);
|
buttonIds.add(MainActivity.DRAWER_ITEM_ATTENDANCE);
|
||||||
buttonIds.add(MainActivity.DRAWER_ITEM_ANNOUNCEMENTS);
|
buttonIds.add(MainActivity.DRAWER_ITEM_ANNOUNCEMENTS);
|
||||||
buttonIds.add(MainActivity.DRAWER_ITEM_NOTIFICATIONS);
|
buttonIds.add(MainActivity.DRAWER_ITEM_NOTIFICATIONS);
|
||||||
buttonIds.add(MainActivity.DRAWER_ITEM_SETTINGS);
|
buttonIds.add(MainActivity.DRAWER_ITEM_SETTINGS);
|
||||||
@ -365,7 +365,7 @@ public class SettingsNewFragment extends MaterialAboutFragment {
|
|||||||
buttonCaptions.add(getString(R.string.menu_messages));
|
buttonCaptions.add(getString(R.string.menu_messages));
|
||||||
buttonCaptions.add(getString(R.string.menu_homework));
|
buttonCaptions.add(getString(R.string.menu_homework));
|
||||||
buttonCaptions.add(getString(R.string.menu_notices));
|
buttonCaptions.add(getString(R.string.menu_notices));
|
||||||
buttonCaptions.add(getString(R.string.menu_attendances));
|
buttonCaptions.add(getString(R.string.menu_attendance));
|
||||||
buttonCaptions.add(getString(R.string.menu_announcements));
|
buttonCaptions.add(getString(R.string.menu_announcements));
|
||||||
buttonCaptions.add(getString(R.string.menu_notifications));
|
buttonCaptions.add(getString(R.string.menu_notifications));
|
||||||
buttonCaptions.add(getString(R.string.menu_settings));
|
buttonCaptions.add(getString(R.string.menu_settings));
|
||||||
@ -1101,8 +1101,8 @@ public class SettingsNewFragment extends MaterialAboutFragment {
|
|||||||
case "Notices":
|
case "Notices":
|
||||||
stringRes = R.string.settings_sync_customize_endpoint_notices;
|
stringRes = R.string.settings_sync_customize_endpoint_notices;
|
||||||
break;
|
break;
|
||||||
case "Attendances":
|
case "Attendance":
|
||||||
stringRes = R.string.settings_sync_customize_endpoint_attendances;
|
stringRes = R.string.settings_sync_customize_endpoint_attendance;
|
||||||
break;
|
break;
|
||||||
case "Announcements":
|
case "Announcements":
|
||||||
stringRes = R.string.settings_sync_customize_endpoint_announcements;
|
stringRes = R.string.settings_sync_customize_endpoint_announcements;
|
||||||
|
@ -1,6 +1,10 @@
|
|||||||
package pl.szczodrzynski.edziennik.ui.modules.timetable;
|
package pl.szczodrzynski.edziennik.ui.modules.timetable;
|
||||||
|
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
import androidx.databinding.DataBindingUtil;
|
import androidx.databinding.DataBindingUtil;
|
||||||
@ -8,25 +12,21 @@ import androidx.fragment.app.Fragment;
|
|||||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
import android.view.LayoutInflater;
|
|
||||||
import android.view.View;
|
|
||||||
import android.view.ViewGroup;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
import pl.szczodrzynski.edziennik.App;
|
import pl.szczodrzynski.edziennik.App;
|
||||||
import pl.szczodrzynski.edziennik.R;
|
|
||||||
import pl.szczodrzynski.edziennik.MainActivity;
|
import pl.szczodrzynski.edziennik.MainActivity;
|
||||||
import pl.szczodrzynski.edziennik.databinding.FragmentRegisterTimetableDayBinding;
|
import pl.szczodrzynski.edziennik.R;
|
||||||
|
import pl.szczodrzynski.edziennik.databinding.FragmentTimetableDayBinding;
|
||||||
|
import pl.szczodrzynski.edziennik.utils.Themes;
|
||||||
import pl.szczodrzynski.edziennik.utils.models.Date;
|
import pl.szczodrzynski.edziennik.utils.models.Date;
|
||||||
import pl.szczodrzynski.edziennik.utils.models.Time;
|
import pl.szczodrzynski.edziennik.utils.models.Time;
|
||||||
import pl.szczodrzynski.edziennik.utils.Themes;
|
|
||||||
|
|
||||||
public class RegisterTimetableDayFragment extends Fragment {
|
public class TimetableDayFragment extends Fragment {
|
||||||
|
|
||||||
private App app = null;
|
private App app = null;
|
||||||
private MainActivity activity = null;
|
private MainActivity activity = null;
|
||||||
private FragmentRegisterTimetableDayBinding b = null;
|
private FragmentTimetableDayBinding b = null;
|
||||||
|
|
||||||
private RecyclerView recyclerView;
|
private RecyclerView recyclerView;
|
||||||
|
|
||||||
@ -40,7 +40,7 @@ public class RegisterTimetableDayFragment extends Fragment {
|
|||||||
if (app.profile == null)
|
if (app.profile == null)
|
||||||
return inflater.inflate(R.layout.fragment_loading, container, false);
|
return inflater.inflate(R.layout.fragment_loading, container, false);
|
||||||
// activity, context and profile is valid
|
// activity, context and profile is valid
|
||||||
b = DataBindingUtil.inflate(inflater, R.layout.fragment_register_timetable_day, container, false);
|
b = DataBindingUtil.inflate(inflater, R.layout.fragment_timetable_day, container, false);
|
||||||
b.refreshLayout.setParent(activity.getSwipeRefreshLayout());
|
b.refreshLayout.setParent(activity.getSwipeRefreshLayout());
|
||||||
return b.getRoot();
|
return b.getRoot();
|
||||||
}
|
}
|
@ -14,18 +14,6 @@ import android.net.Uri;
|
|||||||
import android.os.AsyncTask;
|
import android.os.AsyncTask;
|
||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import androidx.annotation.NonNull;
|
|
||||||
import com.google.android.material.tabs.TabLayout;
|
|
||||||
|
|
||||||
import androidx.annotation.Nullable;
|
|
||||||
import androidx.core.content.FileProvider;
|
|
||||||
import androidx.databinding.DataBindingUtil;
|
|
||||||
import androidx.fragment.app.Fragment;
|
|
||||||
import androidx.fragment.app.FragmentManager;
|
|
||||||
import androidx.fragment.app.FragmentPagerAdapter;
|
|
||||||
import androidx.viewpager.widget.ViewPager;
|
|
||||||
import androidx.cardview.widget.CardView;
|
|
||||||
|
|
||||||
import android.os.Environment;
|
import android.os.Environment;
|
||||||
import android.text.Html;
|
import android.text.Html;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
@ -36,7 +24,18 @@ import android.widget.LinearLayout;
|
|||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.annotation.Nullable;
|
||||||
|
import androidx.cardview.widget.CardView;
|
||||||
|
import androidx.core.content.FileProvider;
|
||||||
|
import androidx.databinding.DataBindingUtil;
|
||||||
|
import androidx.fragment.app.Fragment;
|
||||||
|
import androidx.fragment.app.FragmentManager;
|
||||||
|
import androidx.fragment.app.FragmentPagerAdapter;
|
||||||
|
import androidx.viewpager.widget.ViewPager;
|
||||||
|
|
||||||
import com.afollestad.materialdialogs.MaterialDialog;
|
import com.afollestad.materialdialogs.MaterialDialog;
|
||||||
|
import com.google.android.material.tabs.TabLayout;
|
||||||
import com.mikepenz.iconics.typeface.library.community.material.CommunityMaterial;
|
import com.mikepenz.iconics.typeface.library.community.material.CommunityMaterial;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
@ -47,18 +46,18 @@ import java.util.List;
|
|||||||
import java.util.TreeMap;
|
import java.util.TreeMap;
|
||||||
|
|
||||||
import pl.szczodrzynski.edziennik.App;
|
import pl.szczodrzynski.edziennik.App;
|
||||||
import pl.szczodrzynski.edziennik.R;
|
|
||||||
import pl.szczodrzynski.edziennik.MainActivity;
|
import pl.szczodrzynski.edziennik.MainActivity;
|
||||||
import pl.szczodrzynski.edziennik.databinding.FragmentRegisterTimetableBinding;
|
import pl.szczodrzynski.edziennik.R;
|
||||||
import pl.szczodrzynski.edziennik.data.db.modules.lessons.LessonFull;
|
import pl.szczodrzynski.edziennik.data.db.modules.lessons.LessonFull;
|
||||||
|
import pl.szczodrzynski.edziennik.databinding.FragmentTimetableBinding;
|
||||||
import pl.szczodrzynski.edziennik.ui.dialogs.event.EventManualDialog;
|
import pl.szczodrzynski.edziennik.ui.dialogs.event.EventManualDialog;
|
||||||
import pl.szczodrzynski.edziennik.ui.modules.home.HomeFragment;
|
import pl.szczodrzynski.edziennik.ui.modules.home.HomeFragment;
|
||||||
import pl.szczodrzynski.edziennik.utils.models.Date;
|
|
||||||
import pl.szczodrzynski.edziennik.utils.models.Time;
|
|
||||||
import pl.szczodrzynski.edziennik.utils.models.Week;
|
|
||||||
import pl.szczodrzynski.edziennik.utils.SpannableHtmlTagHandler;
|
import pl.szczodrzynski.edziennik.utils.SpannableHtmlTagHandler;
|
||||||
import pl.szczodrzynski.edziennik.utils.Themes;
|
import pl.szczodrzynski.edziennik.utils.Themes;
|
||||||
import pl.szczodrzynski.edziennik.utils.Utils;
|
import pl.szczodrzynski.edziennik.utils.Utils;
|
||||||
|
import pl.szczodrzynski.edziennik.utils.models.Date;
|
||||||
|
import pl.szczodrzynski.edziennik.utils.models.Time;
|
||||||
|
import pl.szczodrzynski.edziennik.utils.models.Week;
|
||||||
import pl.szczodrzynski.navlib.bottomsheet.items.BottomSheetPrimaryItem;
|
import pl.szczodrzynski.navlib.bottomsheet.items.BottomSheetPrimaryItem;
|
||||||
import pl.szczodrzynski.navlib.bottomsheet.items.BottomSheetSeparatorItem;
|
import pl.szczodrzynski.navlib.bottomsheet.items.BottomSheetSeparatorItem;
|
||||||
|
|
||||||
@ -68,12 +67,12 @@ import static pl.szczodrzynski.edziennik.data.db.modules.metadata.Metadata.TYPE_
|
|||||||
import static pl.szczodrzynski.edziennik.utils.Utils.bs;
|
import static pl.szczodrzynski.edziennik.utils.Utils.bs;
|
||||||
import static pl.szczodrzynski.edziennik.utils.Utils.d;
|
import static pl.szczodrzynski.edziennik.utils.Utils.d;
|
||||||
|
|
||||||
public class RegisterTimetableFragment extends Fragment {
|
public class TimetableFragment extends Fragment {
|
||||||
private static final String TAG = "RegisterTimetable";
|
private static final String TAG = "RegisterTimetable";
|
||||||
|
|
||||||
private App app = null;
|
private App app = null;
|
||||||
private MainActivity activity = null;
|
private MainActivity activity = null;
|
||||||
private FragmentRegisterTimetableBinding b = null;
|
private FragmentTimetableBinding b = null;
|
||||||
|
|
||||||
private ViewPager viewPager;
|
private ViewPager viewPager;
|
||||||
private static int pageSelection = -1;
|
private static int pageSelection = -1;
|
||||||
@ -89,7 +88,7 @@ public class RegisterTimetableFragment extends Fragment {
|
|||||||
if (app.profile == null)
|
if (app.profile == null)
|
||||||
return inflater.inflate(R.layout.fragment_loading, container, false);
|
return inflater.inflate(R.layout.fragment_loading, container, false);
|
||||||
// activity, context and profile is valid
|
// activity, context and profile is valid
|
||||||
b = DataBindingUtil.inflate(inflater, R.layout.fragment_register_timetable, container, false);
|
b = DataBindingUtil.inflate(inflater, R.layout.fragment_timetable, container, false);
|
||||||
return b.getRoot();
|
return b.getRoot();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -154,13 +153,13 @@ public class RegisterTimetableFragment extends Fragment {
|
|||||||
for (int i = 0; i < app.appConfig.timetableDisplayDaysForward + app.appConfig.timetableDisplayDaysBackward + 1; i++) {
|
for (int i = 0; i < app.appConfig.timetableDisplayDaysForward + app.appConfig.timetableDisplayDaysBackward + 1; i++) {
|
||||||
Bundle args = new Bundle();
|
Bundle args = new Bundle();
|
||||||
args.putLong("date", date.getValue());
|
args.putLong("date", date.getValue());
|
||||||
RegisterTimetableDayFragment registerTimetableDayFragment = new RegisterTimetableDayFragment();
|
TimetableDayFragment timetableDayFragment = new TimetableDayFragment();
|
||||||
registerTimetableDayFragment.setArguments(args);
|
timetableDayFragment.setArguments(args);
|
||||||
StringBuilder pageTitle = new StringBuilder(Week.getFullDayName(date.getWeekDay()));
|
StringBuilder pageTitle = new StringBuilder(Week.getFullDayName(date.getWeekDay()));
|
||||||
if (i > weekEnd || i < weekBeginning) {
|
if (i > weekEnd || i < weekBeginning) {
|
||||||
pageTitle.append(", ").append(date.getStringDm());
|
pageTitle.append(", ").append(date.getStringDm());
|
||||||
}
|
}
|
||||||
adapter.addFragment(registerTimetableDayFragment, pageTitle.toString());
|
adapter.addFragment(timetableDayFragment, pageTitle.toString());
|
||||||
date.stepForward(0, 0, 1);
|
date.stepForward(0, 0, 1);
|
||||||
}
|
}
|
||||||
viewPager.setAdapter(adapter);
|
viewPager.setAdapter(adapter);
|
@ -27,7 +27,7 @@
|
|||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/attendancesSummaryTitle"
|
android:id="@+id/attendanceSummaryTitle"
|
||||||
style="@style/Widget.AppCompat.Spinner"
|
style="@style/Widget.AppCompat.Spinner"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
@ -36,7 +36,7 @@
|
|||||||
android:textSize="20sp" />
|
android:textSize="20sp" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/attendancesSummarySubject"
|
android:id="@+id/attendanceSummarySubject"
|
||||||
style="@style/Widget.AppCompat.Spinner"
|
style="@style/Widget.AppCompat.Spinner"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
@ -168,7 +168,7 @@
|
|||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
<androidx.recyclerview.widget.RecyclerView
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
android:id="@+id/attendancesView"
|
android:id="@+id/attendance_view"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_marginTop="8dp"
|
android:layout_marginTop="8dp"
|
||||||
@ -177,7 +177,7 @@
|
|||||||
</androidx.recyclerview.widget.RecyclerView>
|
</androidx.recyclerview.widget.RecyclerView>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/attendancesNoData"
|
android:id="@+id/attendance_no_data"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
@ -69,8 +69,8 @@
|
|||||||
<string name="attendances_releases">Releases:</string>
|
<string name="attendances_releases">Releases:</string>
|
||||||
<string name="attendances_summary_subject_loading_format">All subjects</string>
|
<string name="attendances_summary_subject_loading_format">All subjects</string>
|
||||||
<string name="attendances_summary_title_loading_format">Summary - loading…</string>
|
<string name="attendances_summary_title_loading_format">Summary - loading…</string>
|
||||||
<string name="attendances_summary_title_semester_format">Summary - semester %d </string>
|
<string name="attendance_summary_title_semester_format">Summary - semester %d </string>
|
||||||
<string name="attendances_summary_title_year">Summary - all year </string>
|
<string name="attendance_summary_title_year">Summary - all year </string>
|
||||||
<string name="back">Back</string>
|
<string name="back">Back</string>
|
||||||
<string name="bell_sync_adjust_content">Adjust the bell sync time. Format: ±H:MM:SS</string>
|
<string name="bell_sync_adjust_content">Adjust the bell sync time. Format: ±H:MM:SS</string>
|
||||||
<string name="bell_sync_adjust_error">Incorrect format</string>
|
<string name="bell_sync_adjust_error">Incorrect format</string>
|
||||||
@ -401,7 +401,7 @@
|
|||||||
<string name="menu_add_new_profile">Add a new student</string>
|
<string name="menu_add_new_profile">Add a new student</string>
|
||||||
<string name="menu_agenda">Agenda</string>
|
<string name="menu_agenda">Agenda</string>
|
||||||
<string name="menu_announcements">Notice board</string>
|
<string name="menu_announcements">Notice board</string>
|
||||||
<string name="menu_attendances">Attendance</string>
|
<string name="menu_attendance">Attendance</string>
|
||||||
<string name="menu_grades">Grades</string>
|
<string name="menu_grades">Grades</string>
|
||||||
<string name="menu_grades_editor">Grade editing simulator</string>
|
<string name="menu_grades_editor">Grade editing simulator</string>
|
||||||
<string name="menu_help">Help</string>
|
<string name="menu_help">Help</string>
|
||||||
@ -598,7 +598,7 @@
|
|||||||
<string name="settings_register_shared_events_subtext">Share exams in your class</string>
|
<string name="settings_register_shared_events_subtext">Share exams in your class</string>
|
||||||
<string name="settings_register_shared_events_text">Enable Event sharing</string>
|
<string name="settings_register_shared_events_text">Enable Event sharing</string>
|
||||||
<string name="settings_sync_customize_endpoint_announcements">Notice board</string>
|
<string name="settings_sync_customize_endpoint_announcements">Notice board</string>
|
||||||
<string name="settings_sync_customize_endpoint_attendances">Attendances</string>
|
<string name="settings_sync_customize_endpoint_attendance">Attendances</string>
|
||||||
<string name="settings_sync_customize_endpoint_class_free_days">Class free days</string>
|
<string name="settings_sync_customize_endpoint_class_free_days">Class free days</string>
|
||||||
<string name="settings_sync_customize_endpoint_classrooms">Classrooms</string>
|
<string name="settings_sync_customize_endpoint_classrooms">Classrooms</string>
|
||||||
<string name="settings_sync_customize_endpoint_events">Events/agenda</string>
|
<string name="settings_sync_customize_endpoint_events">Events/agenda</string>
|
||||||
@ -680,7 +680,7 @@
|
|||||||
<string name="sync_action_syncing_account_info">Getting account info</string>
|
<string name="sync_action_syncing_account_info">Getting account info</string>
|
||||||
<string name="sync_action_syncing_announcements">Getting notice board</string>
|
<string name="sync_action_syncing_announcements">Getting notice board</string>
|
||||||
<string name="sync_action_syncing_attendance_types">Getting attendance types</string>
|
<string name="sync_action_syncing_attendance_types">Getting attendance types</string>
|
||||||
<string name="sync_action_syncing_attendances">Getting attendance</string>
|
<string name="sync_action_syncing_attendance">Getting attendance</string>
|
||||||
<string name="sync_action_syncing_behaviour_grade_categories">Getting behaviour grades categories</string>
|
<string name="sync_action_syncing_behaviour_grade_categories">Getting behaviour grades categories</string>
|
||||||
<string name="sync_action_syncing_behaviour_grades">Getting behaviour grades</string>
|
<string name="sync_action_syncing_behaviour_grades">Getting behaviour grades</string>
|
||||||
<string name="sync_action_syncing_calendar">Getting agenda</string>
|
<string name="sync_action_syncing_calendar">Getting agenda</string>
|
||||||
@ -747,7 +747,7 @@
|
|||||||
<string name="sync_feature_agenda">Syncing agenda…</string>
|
<string name="sync_feature_agenda">Syncing agenda…</string>
|
||||||
<string name="sync_feature_all">All</string>
|
<string name="sync_feature_all">All</string>
|
||||||
<string name="sync_feature_announcements">Syncing announcements…</string>
|
<string name="sync_feature_announcements">Syncing announcements…</string>
|
||||||
<string name="sync_feature_attendances">Syncing attendances…</string>
|
<string name="sync_feature_attendance">Syncing attendance…</string>
|
||||||
<string name="sync_feature_grades">Syncing grades…</string>
|
<string name="sync_feature_grades">Syncing grades…</string>
|
||||||
<string name="sync_feature_homework">Syncing homework…</string>
|
<string name="sync_feature_homework">Syncing homework…</string>
|
||||||
<string name="sync_feature_messages_inbox">Syncing received messages…</string>
|
<string name="sync_feature_messages_inbox">Syncing received messages…</string>
|
||||||
|
@ -76,8 +76,8 @@
|
|||||||
<string name="attendances_releases">Zwolnienia:</string>
|
<string name="attendances_releases">Zwolnienia:</string>
|
||||||
<string name="attendances_summary_subject_loading_format">Wszystkie przedmioty</string>
|
<string name="attendances_summary_subject_loading_format">Wszystkie przedmioty</string>
|
||||||
<string name="attendances_summary_title_loading_format">Podsumowanie - ładowanie…</string>
|
<string name="attendances_summary_title_loading_format">Podsumowanie - ładowanie…</string>
|
||||||
<string name="attendances_summary_title_semester_format">Podsumowanie - semestr %d </string>
|
<string name="attendance_summary_title_semester_format">Podsumowanie - semestr %d </string>
|
||||||
<string name="attendances_summary_title_year">Podsumowanie - cały rok </string>
|
<string name="attendance_summary_title_year">Podsumowanie - cały rok </string>
|
||||||
<string name="back">Wróć</string>
|
<string name="back">Wróć</string>
|
||||||
<string name="bell_sync_adjust_content">Dostosuj wartość przesunięcia dzwonka. Format: ±H:MM:SS</string>
|
<string name="bell_sync_adjust_content">Dostosuj wartość przesunięcia dzwonka. Format: ±H:MM:SS</string>
|
||||||
<string name="bell_sync_adjust_error">Nieprawidłowy format</string>
|
<string name="bell_sync_adjust_error">Nieprawidłowy format</string>
|
||||||
@ -425,7 +425,7 @@
|
|||||||
<string name="menu_add_new_profile">Dodaj nowego ucznia</string>
|
<string name="menu_add_new_profile">Dodaj nowego ucznia</string>
|
||||||
<string name="menu_agenda">Terminarz</string>
|
<string name="menu_agenda">Terminarz</string>
|
||||||
<string name="menu_announcements">Tablica ogłoszeń</string>
|
<string name="menu_announcements">Tablica ogłoszeń</string>
|
||||||
<string name="menu_attendances">Frekwencja</string>
|
<string name="menu_attendance">Frekwencja</string>
|
||||||
<string name="menu_generate_block_timetable">Zapisz plan lekcji jako obraz</string>
|
<string name="menu_generate_block_timetable">Zapisz plan lekcji jako obraz</string>
|
||||||
<string name="menu_generate_block_timetable_desc">Generuje plan lekcji na cały tydzień</string>
|
<string name="menu_generate_block_timetable_desc">Generuje plan lekcji na cały tydzień</string>
|
||||||
<string name="menu_grades">Oceny</string>
|
<string name="menu_grades">Oceny</string>
|
||||||
@ -643,7 +643,7 @@
|
|||||||
<string name="settings_register_shared_events_subtext">Udostępniaj sprawdziany w swojej klasie</string>
|
<string name="settings_register_shared_events_subtext">Udostępniaj sprawdziany w swojej klasie</string>
|
||||||
<string name="settings_register_shared_events_text">Włącz Udostępnianie wydarzeń</string>
|
<string name="settings_register_shared_events_text">Włącz Udostępnianie wydarzeń</string>
|
||||||
<string name="settings_sync_customize_endpoint_announcements">Tablica ogłoszeń</string>
|
<string name="settings_sync_customize_endpoint_announcements">Tablica ogłoszeń</string>
|
||||||
<string name="settings_sync_customize_endpoint_attendances">Obecności/nieobecności</string>
|
<string name="settings_sync_customize_endpoint_attendance">Obecności/nieobecności</string>
|
||||||
<string name="settings_sync_customize_endpoint_class_free_days">Dni wolne klasy</string>
|
<string name="settings_sync_customize_endpoint_class_free_days">Dni wolne klasy</string>
|
||||||
<string name="settings_sync_customize_endpoint_classrooms">Sale lekcyjne</string>
|
<string name="settings_sync_customize_endpoint_classrooms">Sale lekcyjne</string>
|
||||||
<string name="settings_sync_customize_endpoint_events">Wydarzenia/terminarz</string>
|
<string name="settings_sync_customize_endpoint_events">Wydarzenia/terminarz</string>
|
||||||
@ -726,7 +726,7 @@
|
|||||||
<string name="sync_action_syncing_account_info">Pobieranie informacji o koncie</string>
|
<string name="sync_action_syncing_account_info">Pobieranie informacji o koncie</string>
|
||||||
<string name="sync_action_syncing_announcements">Pobieranie ogłoszeń szkolnych</string>
|
<string name="sync_action_syncing_announcements">Pobieranie ogłoszeń szkolnych</string>
|
||||||
<string name="sync_action_syncing_attendance_types">Pobieranie kategorii obecności</string>
|
<string name="sync_action_syncing_attendance_types">Pobieranie kategorii obecności</string>
|
||||||
<string name="sync_action_syncing_attendances">Pobieranie obecności</string>
|
<string name="sync_action_syncing_attendance">Pobieranie obecności</string>
|
||||||
<string name="sync_action_syncing_behaviour_grade_categories">Pobieranie kategorii ocen z zachowania</string>
|
<string name="sync_action_syncing_behaviour_grade_categories">Pobieranie kategorii ocen z zachowania</string>
|
||||||
<string name="sync_action_syncing_behaviour_grades">Pobieranie ocen z zachowania</string>
|
<string name="sync_action_syncing_behaviour_grades">Pobieranie ocen z zachowania</string>
|
||||||
<string name="sync_action_syncing_calendar">Pobieranie kalendarza</string>
|
<string name="sync_action_syncing_calendar">Pobieranie kalendarza</string>
|
||||||
@ -794,7 +794,7 @@
|
|||||||
<string name="sync_feature_agenda">Pobieram terminarz…</string>
|
<string name="sync_feature_agenda">Pobieram terminarz…</string>
|
||||||
<string name="sync_feature_all">Wszystkie</string>
|
<string name="sync_feature_all">Wszystkie</string>
|
||||||
<string name="sync_feature_announcements">Pobieram tablicę ogłoszeń…</string>
|
<string name="sync_feature_announcements">Pobieram tablicę ogłoszeń…</string>
|
||||||
<string name="sync_feature_attendances">Pobieram obecności…</string>
|
<string name="sync_feature_attendance">Pobieram obecności…</string>
|
||||||
<string name="sync_feature_grades">Pobieram oceny…</string>
|
<string name="sync_feature_grades">Pobieram oceny…</string>
|
||||||
<string name="sync_feature_homework">Pobieram zadania domowe…</string>
|
<string name="sync_feature_homework">Pobieram zadania domowe…</string>
|
||||||
<string name="sync_feature_messages_inbox">Pobieram wiadomości odebrane…</string>
|
<string name="sync_feature_messages_inbox">Pobieram wiadomości odebrane…</string>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user