mirror of
https://github.com/szkolny-eu/szkolny-android.git
synced 2025-01-18 12:56:45 -06:00
[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.network.ServerRequest
|
||||
import pl.szczodrzynski.edziennik.sync.SyncJob
|
||||
import pl.szczodrzynski.edziennik.ui.modules.agenda.RegisterAgendaDefaultFragment
|
||||
import pl.szczodrzynski.edziennik.ui.modules.announcements.RegisterAnnouncementsFragment
|
||||
import pl.szczodrzynski.edziennik.ui.modules.attendance.RegisterAttendancesFragment
|
||||
import pl.szczodrzynski.edziennik.ui.modules.agenda.AgendaDefaultFragment
|
||||
import pl.szczodrzynski.edziennik.ui.modules.announcements.AnnouncementsFragment
|
||||
import pl.szczodrzynski.edziennik.ui.modules.attendance.AttendanceFragment
|
||||
import pl.szczodrzynski.edziennik.ui.modules.base.DebugFragment
|
||||
import pl.szczodrzynski.edziennik.ui.modules.base.FeedbackFragment
|
||||
import pl.szczodrzynski.edziennik.ui.modules.base.HelpFragment
|
||||
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.notices.RegisterNoticesFragment
|
||||
import pl.szczodrzynski.edziennik.ui.modules.notifications.RegisterNotificationsFragment
|
||||
import pl.szczodrzynski.edziennik.ui.modules.behaviour.BehaviourFragment
|
||||
import pl.szczodrzynski.edziennik.ui.modules.notifications.NotificationsFragment
|
||||
import pl.szczodrzynski.edziennik.ui.modules.settings.ProfileManagerFragment
|
||||
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.Utils
|
||||
import pl.szczodrzynski.navlib.bottomsheet.items.BottomSheetPrimaryItem
|
||||
@ -98,8 +98,8 @@ class MainActivity : AppCompatActivity() {
|
||||
const val DRAWER_ITEM_GRADES = 13
|
||||
const val DRAWER_ITEM_MESSAGES = 17
|
||||
const val DRAWER_ITEM_HOMEWORK = 14
|
||||
const val DRAWER_ITEM_NOTICES = 15
|
||||
const val DRAWER_ITEM_ATTENDANCES = 16
|
||||
const val DRAWER_ITEM_BEHAVIOUR = 15
|
||||
const val DRAWER_ITEM_ATTENDANCE = 16
|
||||
const val DRAWER_ITEM_ANNOUNCEMENTS = 18
|
||||
const val DRAWER_ITEM_NOTIFICATIONS = 20
|
||||
const val DRAWER_ITEM_SETTINGS = 101
|
||||
@ -123,17 +123,17 @@ class MainActivity : AppCompatActivity() {
|
||||
.isStatic(true)
|
||||
.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)
|
||||
.withBadgeTypeId(TYPE_LESSON_CHANGE)
|
||||
.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)
|
||||
.withBadgeTypeId(TYPE_EVENT)
|
||||
.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)
|
||||
.withBadgeTypeId(TYPE_GRADE)
|
||||
.isInDrawer(true)
|
||||
@ -148,24 +148,24 @@ class MainActivity : AppCompatActivity() {
|
||||
.withBadgeTypeId(TYPE_HOMEWORK)
|
||||
.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)
|
||||
.withBadgeTypeId(TYPE_NOTICE)
|
||||
.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)
|
||||
.withBadgeTypeId(TYPE_ATTENDANCE)
|
||||
.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)
|
||||
.withBadgeTypeId(TYPE_ANNOUNCEMENT)
|
||||
.isInDrawer(true)
|
||||
|
||||
|
||||
// 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)
|
||||
.isInDrawer(true)
|
||||
.isStatic(true)
|
||||
@ -537,8 +537,8 @@ class MainActivity : AppCompatActivity() {
|
||||
DRAWER_ITEM_AGENDA -> FEATURE_AGENDA
|
||||
DRAWER_ITEM_GRADES -> FEATURE_GRADES
|
||||
DRAWER_ITEM_HOMEWORK -> FEATURE_HOMEWORK
|
||||
DRAWER_ITEM_NOTICES -> FEATURE_NOTICES
|
||||
DRAWER_ITEM_ATTENDANCES -> FEATURE_ATTENDANCES
|
||||
DRAWER_ITEM_BEHAVIOUR -> FEATURE_NOTICES
|
||||
DRAWER_ITEM_ATTENDANCE -> FEATURE_ATTENDANCE
|
||||
DRAWER_ITEM_MESSAGES -> when (MessagesFragment.pageSelection) {
|
||||
1 -> FEATURE_MESSAGES_OUTBOX
|
||||
else -> FEATURE_MESSAGES_INBOX
|
||||
@ -553,8 +553,8 @@ class MainActivity : AppCompatActivity() {
|
||||
DRAWER_ITEM_AGENDA -> R.string.sync_feature_agenda
|
||||
DRAWER_ITEM_GRADES -> R.string.sync_feature_grades
|
||||
DRAWER_ITEM_HOMEWORK -> R.string.sync_feature_homework
|
||||
DRAWER_ITEM_NOTICES -> R.string.sync_feature_notices
|
||||
DRAWER_ITEM_ATTENDANCES -> R.string.sync_feature_attendances
|
||||
DRAWER_ITEM_BEHAVIOUR -> R.string.sync_feature_notices
|
||||
DRAWER_ITEM_ATTENDANCE -> R.string.sync_feature_attendance
|
||||
DRAWER_ITEM_MESSAGES -> when (MessagesFragment.pageSelection) {
|
||||
1 -> R.string.sync_feature_messages_outbox
|
||||
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_ALL;
|
||||
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_HOMEWORK;
|
||||
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)
|
||||
.withProfileData(profile.getId(), profile.getName())
|
||||
.withType(Notification.TYPE_NEW_NOTICE)
|
||||
.withFragmentRedirect(MainActivity.DRAWER_ITEM_NOTICES)
|
||||
.withFragmentRedirect(MainActivity.DRAWER_ITEM_BEHAVIOUR)
|
||||
.withLongExtra("noticeId", notice.id)
|
||||
.withAddedDate(notice.addedDate)
|
||||
);
|
||||
@ -382,7 +382,7 @@ public class Edziennik {
|
||||
app.notifier.add(new Notification(app.getContext(), text)
|
||||
.withProfileData(profile.getId(), profile.getName())
|
||||
.withType(Notification.TYPE_NEW_ATTENDANCE)
|
||||
.withFragmentRedirect(MainActivity.DRAWER_ITEM_ATTENDANCES)
|
||||
.withFragmentRedirect(MainActivity.DRAWER_ITEM_ATTENDANCE)
|
||||
.withLongExtra("attendanceId", attendance.id)
|
||||
.withAddedDate(attendance.addedDate)
|
||||
);
|
||||
@ -849,7 +849,7 @@ public class Edziennik {
|
||||
app.getString(R.string.menu_grades),
|
||||
app.getString(R.string.menu_homework),
|
||||
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_sent_single),
|
||||
app.getString(R.string.menu_announcements)
|
||||
@ -860,7 +860,7 @@ public class Edziennik {
|
||||
FEATURE_GRADES,
|
||||
FEATURE_HOMEWORK,
|
||||
FEATURE_NOTICES,
|
||||
FEATURE_ATTENDANCES,
|
||||
FEATURE_ATTENDANCE,
|
||||
FEATURE_MESSAGES_INBOX,
|
||||
FEATURE_MESSAGES_OUTBOX,
|
||||
FEATURE_ANNOUNCEMENTS
|
||||
|
@ -200,7 +200,7 @@ public class Iuczniowie implements EdziennikInterface {
|
||||
targetEndpoints.add("Exams");
|
||||
targetEndpoints.add("Notices");
|
||||
targetEndpoints.add("Announcements");
|
||||
targetEndpoints.add("Attendances");
|
||||
targetEndpoints.add("Attendance");
|
||||
targetEndpoints.add("MessagesInbox");
|
||||
targetEndpoints.add("MessagesOutbox");
|
||||
targetEndpoints.add("Finish");
|
||||
@ -241,8 +241,8 @@ public class Iuczniowie implements EdziennikInterface {
|
||||
case FEATURE_NOTICES:
|
||||
targetEndpoints.add("Notices");
|
||||
break;
|
||||
case FEATURE_ATTENDANCES:
|
||||
targetEndpoints.add("Attendances");
|
||||
case FEATURE_ATTENDANCE:
|
||||
targetEndpoints.add("Attendance");
|
||||
break;
|
||||
case FEATURE_MESSAGES_INBOX:
|
||||
targetEndpoints.add("MessagesInbox");
|
||||
@ -300,9 +300,9 @@ public class Iuczniowie implements EdziennikInterface {
|
||||
}
|
||||
}
|
||||
|
||||
this.attendancesMonth = today.month;
|
||||
this.attendancesYear = today.year;
|
||||
this.attendancesPrevMonthChecked = false;
|
||||
this.attendanceMonth = today.month;
|
||||
this.attendanceYear = today.year;
|
||||
this.attendancePrevMonthChecked = false;
|
||||
this.examsMonth = today.month;
|
||||
this.examsYear = today.year;
|
||||
this.examsMonthsChecked = 0;
|
||||
@ -352,8 +352,8 @@ public class Iuczniowie implements EdziennikInterface {
|
||||
case "Announcements":
|
||||
getAnnouncements();
|
||||
break;
|
||||
case "Attendances":
|
||||
getAttendances();
|
||||
case "Attendance":
|
||||
getAttendance();
|
||||
break;
|
||||
case "MessagesInbox":
|
||||
getMessagesInbox();
|
||||
@ -1196,17 +1196,17 @@ public class Iuczniowie implements EdziennikInterface {
|
||||
});
|
||||
}
|
||||
|
||||
private int attendancesYear;
|
||||
private int attendancesMonth;
|
||||
private boolean attendancesPrevMonthChecked = false;
|
||||
private void getAttendances() {
|
||||
callback.onActionStarted(R.string.sync_action_syncing_attendances);
|
||||
private int attendanceYear;
|
||||
private int attendanceMonth;
|
||||
private boolean attendancePrevMonthChecked = false;
|
||||
private void getAttendance() {
|
||||
callback.onActionStarted(R.string.sync_action_syncing_attendance);
|
||||
apiRequest(Request.builder()
|
||||
.url(IDZIENNIK_URL +"/mod_panelRodzica/obecnosci/WS_obecnosciUcznia.asmx/pobierzObecnosciUcznia")
|
||||
.userAgent(userAgent)
|
||||
.addParameter("idPozDziennika", loginRegisterId)
|
||||
.addParameter("mc", attendancesMonth)
|
||||
.addParameter("rok", attendancesYear)
|
||||
.addParameter("mc", attendanceMonth)
|
||||
.addParameter("rok", attendanceYear)
|
||||
.addParameter("dataTygodnia", "")
|
||||
.postJson(), (result, response) -> {
|
||||
JsonObject data = result.getAsJsonObject("d");
|
||||
@ -1281,25 +1281,25 @@ public class Iuczniowie implements EdziennikInterface {
|
||||
}
|
||||
}
|
||||
|
||||
int attendancesDateValue = attendancesYear*10000 + attendancesMonth*100;
|
||||
if (profile.getEmpty() && attendancesDateValue > profile.getSemesterStart(1).getValue()) {
|
||||
attendancesPrevMonthChecked = true; // do not need to check prev month later
|
||||
attendancesMonth--;
|
||||
if (attendancesMonth < 1) {
|
||||
attendancesMonth = 12;
|
||||
attendancesYear--;
|
||||
int attendanceDateValue = attendanceYear *10000 + attendanceMonth *100;
|
||||
if (profile.getEmpty() && attendanceDateValue > profile.getSemesterStart(1).getValue()) {
|
||||
attendancePrevMonthChecked = true; // do not need to check prev month later
|
||||
attendanceMonth--;
|
||||
if (attendanceMonth < 1) {
|
||||
attendanceMonth = 12;
|
||||
attendanceYear--;
|
||||
}
|
||||
r("get", "Attendances");
|
||||
} else if (!attendancesPrevMonthChecked /* get also the previous month */) {
|
||||
attendancesMonth--;
|
||||
if (attendancesMonth < 1) {
|
||||
attendancesMonth = 12;
|
||||
attendancesYear--;
|
||||
r("get", "Attendance");
|
||||
} else if (!attendancePrevMonthChecked /* get also the previous month */) {
|
||||
attendanceMonth--;
|
||||
if (attendanceMonth < 1) {
|
||||
attendanceMonth = 12;
|
||||
attendanceYear--;
|
||||
}
|
||||
attendancesPrevMonthChecked = true;
|
||||
r("get", "Attendances");
|
||||
attendancePrevMonthChecked = true;
|
||||
r("get", "Attendance");
|
||||
} else {
|
||||
r("finish", "Attendances");
|
||||
r("finish", "Attendance");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -297,8 +297,8 @@ public class Librus implements EdziennikInterface {
|
||||
targetEndpoints.add("Homework");
|
||||
targetEndpoints.add("LuckyNumbers");
|
||||
targetEndpoints.add("Notices");
|
||||
targetEndpoints.add("AttendancesTypes");
|
||||
targetEndpoints.add("Attendances");
|
||||
targetEndpoints.add("AttendanceTypes");
|
||||
targetEndpoints.add("Attendance");
|
||||
targetEndpoints.add("Announcements");
|
||||
targetEndpoints.add("PtMeetings");
|
||||
|
||||
@ -371,9 +371,9 @@ public class Librus implements EdziennikInterface {
|
||||
case FEATURE_NOTICES:
|
||||
targetEndpoints.add("Notices");
|
||||
break;
|
||||
case FEATURE_ATTENDANCES:
|
||||
targetEndpoints.add("AttendancesTypes");
|
||||
targetEndpoints.add("Attendances");
|
||||
case FEATURE_ATTENDANCE:
|
||||
targetEndpoints.add("AttendanceTypes");
|
||||
targetEndpoints.add("Attendance");
|
||||
break;
|
||||
case FEATURE_MESSAGES_INBOX:
|
||||
if (!hasMessagesLogin) {
|
||||
@ -527,11 +527,11 @@ public class Librus implements EdziennikInterface {
|
||||
case "Notices":
|
||||
getNotices();
|
||||
break;
|
||||
case "AttendancesTypes":
|
||||
getAttendancesTypes();
|
||||
case "AttendanceTypes":
|
||||
getAttendanceTypes();
|
||||
break;
|
||||
case "Attendances":
|
||||
getAttendances();
|
||||
case "Attendance":
|
||||
getAttendance();
|
||||
break;
|
||||
case "Announcements":
|
||||
getAnnouncements();
|
||||
@ -2888,11 +2888,11 @@ public class Librus implements EdziennikInterface {
|
||||
}
|
||||
|
||||
private SparseArray<Pair<Integer, String>> attendanceTypes = new SparseArray<>();
|
||||
private void getAttendancesTypes() {
|
||||
private void getAttendanceTypes() {
|
||||
callback.onActionStarted(R.string.sync_action_syncing_attendance_types);
|
||||
apiRequest("Attendances/Types", data -> {
|
||||
if (data == null) {
|
||||
r("finish", "AttendancesTypes");
|
||||
r("finish", "AttendanceTypes");
|
||||
return;
|
||||
}
|
||||
try {
|
||||
@ -2907,7 +2907,7 @@ public class Librus implements EdziennikInterface {
|
||||
)
|
||||
);
|
||||
}
|
||||
r("finish", "AttendancesTypes");
|
||||
r("finish", "AttendanceTypes");
|
||||
}
|
||||
catch (Exception e) {
|
||||
finishWithError(new AppError(TAG, 2782, CODE_OTHER, e, data));
|
||||
@ -2915,18 +2915,18 @@ public class Librus implements EdziennikInterface {
|
||||
});
|
||||
}
|
||||
|
||||
private void getAttendances() {
|
||||
callback.onActionStarted(R.string.sync_action_syncing_attendances);
|
||||
private void getAttendance() {
|
||||
callback.onActionStarted(R.string.sync_action_syncing_attendance);
|
||||
apiRequest("Attendances"+(fullSync ? "" : "?dateFrom="+ Date.getToday().stepForward(0, -1, 0).getStringY_m_d()), data -> {
|
||||
if (data == null) {
|
||||
r("finish", "Attendances");
|
||||
r("finish", "Attendance");
|
||||
return;
|
||||
}
|
||||
|
||||
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();
|
||||
|
||||
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));
|
||||
}
|
||||
}
|
||||
r("finish", "Attendances");
|
||||
r("finish", "Attendance");
|
||||
}
|
||||
catch (Exception e) {
|
||||
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("LuckyNumbers", new Endpoint("LuckyNumbers",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("PtMeetings", new Endpoint("PtMeetings",true, true, 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 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) {
|
||||
this.activityContext = activityContext;
|
||||
@ -171,7 +171,7 @@ public class Mobidziennik implements EdziennikInterface {
|
||||
return false;
|
||||
}
|
||||
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");
|
||||
|
||||
teamList = profileId == -1 ? new ArrayList<>() : app.db.teamDao().getAllNow(profileId);
|
||||
@ -204,7 +204,7 @@ public class Mobidziennik implements EdziennikInterface {
|
||||
targetEndpoints = new ArrayList<>();
|
||||
targetEndpoints.add("GetData");
|
||||
targetEndpoints.add("ProcessData");
|
||||
targetEndpoints.add("Attendances");
|
||||
targetEndpoints.add("Attendance");
|
||||
targetEndpoints.add("ClassCalendar");
|
||||
targetEndpoints.add("GradeDetails");
|
||||
targetEndpoints.add("NoticeDetails");
|
||||
@ -256,8 +256,8 @@ public class Mobidziennik implements EdziennikInterface {
|
||||
case FEATURE_NOTICES:
|
||||
targetEndpoints.add("NoticeDetails");
|
||||
break;
|
||||
case FEATURE_ATTENDANCES:
|
||||
targetEndpoints.add("Attendances");
|
||||
case FEATURE_ATTENDANCE:
|
||||
targetEndpoints.add("Attendance");
|
||||
break;
|
||||
case FEATURE_MESSAGES_INBOX:
|
||||
targetEndpoints.add("MessagesInbox");
|
||||
@ -314,8 +314,8 @@ public class Mobidziennik implements EdziennikInterface {
|
||||
case "NoticeDetails":
|
||||
getNoticeDetails();
|
||||
break;
|
||||
case "Attendances":
|
||||
getAttendances();
|
||||
case "Attendance":
|
||||
getAttendance();
|
||||
break;
|
||||
case "Messages":
|
||||
getAllMessages();
|
||||
@ -597,7 +597,7 @@ public class Mobidziennik implements EdziennikInterface {
|
||||
processLessons(table);
|
||||
}
|
||||
if (i == 16) {
|
||||
processAttendances(table);
|
||||
processAttendance(table);
|
||||
}
|
||||
if (i == 17) {
|
||||
processNotices(table);
|
||||
@ -1051,20 +1051,20 @@ public class Mobidziennik implements EdziennikInterface {
|
||||
this.lessonId = lessonId;
|
||||
}
|
||||
}
|
||||
private Date attendancesCheckDate = Week.getWeekStart();
|
||||
private void getAttendances() {
|
||||
r("finish", "Attendances");
|
||||
// TODO: 2019-09-10 please download attendances from /dziennik/frekwencja. /mobile does not work above v13.0
|
||||
private Date attendanceCheckDate = Week.getWeekStart();
|
||||
private void getAttendance() {
|
||||
r("finish", "Attendance");
|
||||
// TODO: 2019-09-10 please download attendance from /dziennik/frekwencja. /mobile does not work above v13.0
|
||||
if (true) {
|
||||
return;
|
||||
}
|
||||
callback.onActionStarted(R.string.sync_action_syncing_attendances);
|
||||
d(TAG, "Get attendances for week "+attendancesCheckDate.getStringY_m_d());
|
||||
callback.onActionStarted(R.string.sync_action_syncing_attendance);
|
||||
d(TAG, "Get attendance for week "+ attendanceCheckDate.getStringY_m_d());
|
||||
Request.builder()
|
||||
.url(fakeLogin ? "https://szkolny.eu/mobimobi/mobi_mod_frekwencja.php" : "https://" + loginServerName + ".mobidziennik.pl/mobile/frekwencja")
|
||||
.userAgent(System.getProperty("http.agent"))
|
||||
.addParameter("uczen", studentId)
|
||||
.addParameter("data_poniedzialek", attendancesCheckDate.getStringY_m_d())
|
||||
.addParameter("data_poniedzialek", attendanceCheckDate.getStringY_m_d())
|
||||
.post()
|
||||
.callback(new TextCallbackHandler() {
|
||||
@Override
|
||||
@ -1076,11 +1076,11 @@ public class Mobidziennik implements EdziennikInterface {
|
||||
public void onSuccess(String data, Response response) {
|
||||
// just skip any failures here
|
||||
if (data == null || data.equals("")) {
|
||||
r("finish", "Attendances");
|
||||
r("finish", "Attendance");
|
||||
return;
|
||||
}
|
||||
if (data.contains("nie-pamietam-hasla")) {
|
||||
r("finish", "Attendances");
|
||||
r("finish", "Attendance");
|
||||
return;
|
||||
}
|
||||
|
||||
@ -1135,7 +1135,7 @@ public class Mobidziennik implements EdziennikInterface {
|
||||
continue;
|
||||
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);
|
||||
|
||||
int markerIndex = 0;
|
||||
@ -1201,7 +1201,7 @@ public class Mobidziennik implements EdziennikInterface {
|
||||
markerIndex++;
|
||||
attendanceList.add(attendanceObject);
|
||||
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));
|
||||
}
|
||||
}
|
||||
@ -1209,40 +1209,40 @@ public class Mobidziennik implements EdziennikInterface {
|
||||
} catch (Exception e) {
|
||||
Crashlytics.logException(e);
|
||||
e.printStackTrace();
|
||||
if (onlyFeature == FEATURE_ATTENDANCES)
|
||||
if (onlyFeature == FEATURE_ATTENDANCE)
|
||||
finishWithError(new AppError(TAG, 955, CODE_OTHER, response, e, data));
|
||||
else
|
||||
r("finish", "Attendances");
|
||||
r("finish", "Attendance");
|
||||
return;
|
||||
}
|
||||
|
||||
if (onlyFeature == FEATURE_ATTENDANCES) {
|
||||
// syncing attendances exclusively
|
||||
if (attendancesLastSync == 0) {
|
||||
// first sync - get attendances until it's start of the school year
|
||||
attendancesLastSync = profile.getSemesterStart(1).getInMillis();
|
||||
if (onlyFeature == FEATURE_ATTENDANCE) {
|
||||
// syncing attendance exclusively
|
||||
if (attendanceLastSync == 0) {
|
||||
// first sync - get attendance until it's start of the school year
|
||||
attendanceLastSync = profile.getSemesterStart(1).getInMillis();
|
||||
}
|
||||
Date lastSyncDate = Date.fromMillis(attendancesLastSync);
|
||||
Date lastSyncDate = Date.fromMillis(attendanceLastSync);
|
||||
lastSyncDate.stepForward(0, 0, -7);
|
||||
if (lastSyncDate.getValue() < attendancesCheckDate.getValue()) {
|
||||
attendancesCheckDate.stepForward(0, 0, -7);
|
||||
r("get", "Attendances");
|
||||
if (lastSyncDate.getValue() < attendanceCheckDate.getValue()) {
|
||||
attendanceCheckDate.stepForward(0, 0, -7);
|
||||
r("get", "Attendance");
|
||||
}
|
||||
else {
|
||||
profile.putStudentData("attendancesLastSync", System.currentTimeMillis());
|
||||
r("finish", "Attendances");
|
||||
profile.putStudentData("attendanceLastSync", System.currentTimeMillis());
|
||||
r("finish", "Attendance");
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (attendancesLastSync != 0) {
|
||||
if (attendanceLastSync != 0) {
|
||||
// not a first sync
|
||||
Date lastSyncDate = Date.fromMillis(attendancesLastSync);
|
||||
Date lastSyncDate = Date.fromMillis(attendanceLastSync);
|
||||
lastSyncDate.stepForward(0, 0, 2);
|
||||
if (lastSyncDate.getValue() >= attendancesCheckDate.getValue()) {
|
||||
profile.putStudentData("attendancesLastSync", System.currentTimeMillis());
|
||||
if (lastSyncDate.getValue() >= attendanceCheckDate.getValue()) {
|
||||
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)
|
||||
return;
|
||||
String[] attendances = table.split("\n");
|
||||
for (String attendanceStr: attendances)
|
||||
String[] attendanceList = table.split("\n");
|
||||
for (String attendanceStr: attendanceList)
|
||||
{
|
||||
if (attendanceStr.isEmpty()) {
|
||||
continue;
|
||||
@ -1718,7 +1718,7 @@ public class Mobidziennik implements EdziennikInterface {
|
||||
mobiLesson.date,
|
||||
mobiLesson.startTime,
|
||||
type);
|
||||
attendanceList.add(attendanceObject);
|
||||
this.attendanceList.add(attendanceObject);
|
||||
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_HOMEWORK = "mobile-api/Uczen.v3.Uczen/ZadaniaDomowe";
|
||||
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_SENT = "mobile-api/Uczen.v3.Uczen/WiadomosciWyslane";
|
||||
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("Homework");
|
||||
targetEndpoints.add("Notices");
|
||||
targetEndpoints.add("Attendances");
|
||||
targetEndpoints.add("Attendance");
|
||||
targetEndpoints.add("MessagesInbox");
|
||||
targetEndpoints.add("MessagesOutbox");
|
||||
targetEndpoints.add("Finish");
|
||||
@ -303,8 +303,8 @@ public class Vulcan implements EdziennikInterface {
|
||||
case FEATURE_NOTICES:
|
||||
targetEndpoints.add("Notices");
|
||||
break;
|
||||
case FEATURE_ATTENDANCES:
|
||||
targetEndpoints.add("Attendances");
|
||||
case FEATURE_ATTENDANCE:
|
||||
targetEndpoints.add("Attendance");
|
||||
break;
|
||||
case FEATURE_MESSAGES_INBOX:
|
||||
targetEndpoints.add("MessagesInbox");
|
||||
@ -386,8 +386,8 @@ public class Vulcan implements EdziennikInterface {
|
||||
case "Notices":
|
||||
getNotices();
|
||||
break;
|
||||
case "Attendances":
|
||||
getAttendances();
|
||||
case "Attendance":
|
||||
getAttendance();
|
||||
break;
|
||||
case "MessagesInbox":
|
||||
getMessagesInbox();
|
||||
@ -1459,18 +1459,18 @@ public class Vulcan implements EdziennikInterface {
|
||||
});
|
||||
}
|
||||
|
||||
private void getAttendances() {
|
||||
callback.onActionStarted(R.string.sync_action_syncing_attendances);
|
||||
private void getAttendance() {
|
||||
callback.onActionStarted(R.string.sync_action_syncing_attendance);
|
||||
JsonObject json = new JsonObject();
|
||||
json.addProperty("DataPoczatkowa", true ? getCurrentSemesterStartDate().getStringY_m_d() : oneMonthBack.getStringY_m_d());
|
||||
json.addProperty("DataKoncowa", getCurrentSemesterEndDate().getStringY_m_d());
|
||||
json.addProperty("IdOddzial", studentClassId);
|
||||
json.addProperty("IdUczen", studentId);
|
||||
json.addProperty("IdOkresKlasyfikacyjny", studentSemesterId);
|
||||
apiRequest(schoolSymbol+"/"+ENDPOINT_ATTENDANCES, json, result -> {
|
||||
JsonArray attendances = result.getAsJsonObject("Data").getAsJsonArray("Frekwencje");
|
||||
apiRequest(schoolSymbol+"/"+ ENDPOINT_ATTENDANCE, json, result -> {
|
||||
JsonArray attendanceList = result.getAsJsonObject("Data").getAsJsonArray("Frekwencje");
|
||||
|
||||
for (JsonElement attendanceEl: attendances) {
|
||||
for (JsonElement attendanceEl: attendanceList) {
|
||||
JsonObject attendance = attendanceEl.getAsJsonObject();
|
||||
|
||||
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,
|
||||
type);
|
||||
|
||||
attendanceList.add(attendanceObject);
|
||||
this.attendanceList.add(attendanceObject);
|
||||
if (attendanceObject.type != TYPE_PRESENT) {
|
||||
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_HOMEWORK = 4;
|
||||
int FEATURE_NOTICES = 5;
|
||||
int FEATURE_ATTENDANCES = 6;
|
||||
int FEATURE_ATTENDANCE = 6;
|
||||
int FEATURE_MESSAGES_INBOX = 7;
|
||||
int FEATURE_MESSAGES_OUTBOX = 8;
|
||||
int FEATURE_ANNOUNCEMENTS = 9;
|
||||
|
@ -6,7 +6,7 @@ const val FEATURE_AGENDA = 2
|
||||
const val FEATURE_GRADES = 3
|
||||
const val FEATURE_HOMEWORK = 4
|
||||
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_OUTBOX = 8
|
||||
const val FEATURE_ANNOUNCEMENTS = 9
|
||||
|
@ -204,7 +204,7 @@ public abstract class MetadataDao {
|
||||
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);")
|
||||
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);")
|
||||
public abstract void deleteUnusedEvents(int profileId);
|
||||
@ -225,7 +225,7 @@ public abstract class MetadataDao {
|
||||
public void deleteUnused(int profileId) {
|
||||
deleteUnusedGrades(profileId);
|
||||
deleteUnusedNotices(profileId);
|
||||
deleteUnusedAttendances(profileId);
|
||||
deleteUnusedAttendance(profileId);
|
||||
deleteUnusedEvents(profileId);
|
||||
deleteUnusedHomework(profileId);
|
||||
deleteUnusedLessonChanges(profileId);
|
||||
|
@ -5,11 +5,11 @@ import androidx.room.ColumnInfo
|
||||
import com.google.gson.JsonObject
|
||||
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_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_HOMEWORK
|
||||
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.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_MESSAGES)
|
||||
fragmentIds.add(DRAWER_ITEM_HOMEWORK)
|
||||
fragmentIds.add(DRAWER_ITEM_NOTICES)
|
||||
fragmentIds.add(DRAWER_ITEM_ATTENDANCES)
|
||||
fragmentIds.add(DRAWER_ITEM_BEHAVIOUR)
|
||||
fragmentIds.add(DRAWER_ITEM_ATTENDANCE)
|
||||
return fragmentIds
|
||||
}
|
||||
LOGIN_TYPE_LIBRUS -> {
|
||||
@ -63,8 +63,8 @@ class ProfileFull : Profile {
|
||||
fragmentIds.add(DRAWER_ITEM_GRADES)
|
||||
fragmentIds.add(DRAWER_ITEM_MESSAGES)
|
||||
fragmentIds.add(DRAWER_ITEM_HOMEWORK)
|
||||
fragmentIds.add(DRAWER_ITEM_NOTICES)
|
||||
fragmentIds.add(DRAWER_ITEM_ATTENDANCES)
|
||||
fragmentIds.add(DRAWER_ITEM_BEHAVIOUR)
|
||||
fragmentIds.add(DRAWER_ITEM_ATTENDANCE)
|
||||
fragmentIds.add(DRAWER_ITEM_ANNOUNCEMENTS)
|
||||
return fragmentIds
|
||||
}
|
||||
@ -74,8 +74,8 @@ class ProfileFull : Profile {
|
||||
fragmentIds.add(DRAWER_ITEM_AGENDA)
|
||||
fragmentIds.add(DRAWER_ITEM_GRADES)
|
||||
fragmentIds.add(DRAWER_ITEM_MESSAGES)
|
||||
fragmentIds.add(DRAWER_ITEM_NOTICES)
|
||||
fragmentIds.add(DRAWER_ITEM_ATTENDANCES)
|
||||
fragmentIds.add(DRAWER_ITEM_BEHAVIOUR)
|
||||
fragmentIds.add(DRAWER_ITEM_ATTENDANCE)
|
||||
fragmentIds.add(DRAWER_ITEM_ANNOUNCEMENTS)
|
||||
return fragmentIds
|
||||
}
|
||||
|
@ -27,7 +27,7 @@ import java.util.List;
|
||||
|
||||
import pl.szczodrzynski.edziennik.App;
|
||||
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.lessons.LessonFull;
|
||||
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;
|
||||
|
||||
public class RegisterAgendaCalendarFragment extends Fragment {
|
||||
public class AgendaCalendarFragment extends Fragment {
|
||||
|
||||
private App app = null;
|
||||
private Activity activity = null;
|
||||
private FragmentRegisterAgendaCalendarBinding b = null;
|
||||
private FragmentAgendaCalendarBinding b = null;
|
||||
|
||||
@Override
|
||||
public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||
@ -52,7 +52,7 @@ public class RegisterAgendaCalendarFragment extends Fragment {
|
||||
if (app.profile == null)
|
||||
return inflater.inflate(R.layout.fragment_loading, container, false);
|
||||
// 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();
|
||||
}
|
||||
|
@ -36,8 +36,8 @@ import java.util.Locale;
|
||||
import pl.szczodrzynski.edziennik.App;
|
||||
import pl.szczodrzynski.edziennik.R;
|
||||
import pl.szczodrzynski.edziennik.MainActivity;
|
||||
import pl.szczodrzynski.edziennik.databinding.FragmentRegisterAgendaCalendarBinding;
|
||||
import pl.szczodrzynski.edziennik.databinding.FragmentRegisterAgendaDefaultBinding;
|
||||
import pl.szczodrzynski.edziennik.databinding.FragmentAgendaCalendarBinding;
|
||||
import pl.szczodrzynski.edziennik.databinding.FragmentAgendaDefaultBinding;
|
||||
import pl.szczodrzynski.edziennik.data.db.modules.events.EventFull;
|
||||
import pl.szczodrzynski.edziennik.data.db.modules.lessons.LessonFull;
|
||||
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.profiles.Profile.AGENDA_CALENDAR;
|
||||
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;
|
||||
|
||||
public class RegisterAgendaDefaultFragment extends Fragment {
|
||||
public class AgendaDefaultFragment extends Fragment {
|
||||
|
||||
private App app = null;
|
||||
private MainActivity activity = null;
|
||||
private FragmentRegisterAgendaDefaultBinding b_default = null;
|
||||
private FragmentRegisterAgendaCalendarBinding b_calendar = null;
|
||||
private FragmentAgendaDefaultBinding b_default = null;
|
||||
private FragmentAgendaCalendarBinding b_calendar = null;
|
||||
private int viewType = AGENDA_DEFAULT;
|
||||
|
||||
@Override
|
||||
@ -78,11 +77,11 @@ public class RegisterAgendaDefaultFragment extends Fragment {
|
||||
// activity, context and profile is valid
|
||||
viewType = app.profile.getAgendaViewType();
|
||||
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();
|
||||
}
|
||||
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();
|
||||
}
|
||||
}
|
@ -7,30 +7,31 @@ import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
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.Nullable;
|
||||
import androidx.databinding.DataBindingUtil;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
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.R;
|
||||
import pl.szczodrzynski.edziennik.MainActivity;
|
||||
import pl.szczodrzynski.edziennik.R;
|
||||
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.navlib.bottomsheet.items.BottomSheetPrimaryItem;
|
||||
|
||||
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 MainActivity activity = null;
|
||||
private FragmentRegisterSchoolNoticesBinding b = null;
|
||||
private FragmentAnnouncementsBinding b = null;
|
||||
|
||||
@Override
|
||||
public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||
@ -42,7 +43,7 @@ public class RegisterAnnouncementsFragment extends Fragment {
|
||||
if (app.profile == null)
|
||||
return inflater.inflate(R.layout.fragment_loading, container, false);
|
||||
// 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());
|
||||
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_RELEASED;
|
||||
|
||||
public class AttendancesAdapter extends RecyclerView.Adapter<AttendancesAdapter.ViewHolder> {
|
||||
public class AttendanceAdapter extends RecyclerView.Adapter<AttendanceAdapter.ViewHolder> {
|
||||
private Context context;
|
||||
public List<AttendanceFull> attendanceList;
|
||||
|
||||
//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.attendanceList = noticeList;
|
||||
}
|
@ -1,18 +1,8 @@
|
||||
package pl.szczodrzynski.edziennik.ui.modules.attendance;
|
||||
|
||||
import androidx.appcompat.widget.PopupMenu;
|
||||
import androidx.databinding.DataBindingUtil;
|
||||
|
||||
import android.graphics.Color;
|
||||
import android.os.AsyncTask;
|
||||
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.util.LongSparseArray;
|
||||
import android.view.Gravity;
|
||||
@ -24,6 +14,14 @@ import android.view.animation.Animation;
|
||||
import android.view.animation.Transformation;
|
||||
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.mikepenz.iconics.IconicsColor;
|
||||
import com.mikepenz.iconics.IconicsDrawable;
|
||||
@ -37,14 +35,14 @@ import java.util.Locale;
|
||||
|
||||
import antonkozyriatskyi.circularprogressindicator.CircularProgressIndicator;
|
||||
import pl.szczodrzynski.edziennik.App;
|
||||
import pl.szczodrzynski.edziennik.R;
|
||||
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.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.Week;
|
||||
import pl.szczodrzynski.edziennik.utils.Themes;
|
||||
import pl.szczodrzynski.navlib.bottomsheet.items.BottomSheetPrimaryItem;
|
||||
|
||||
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.metadata.Metadata.TYPE_ATTENDANCE;
|
||||
|
||||
public class RegisterAttendancesFragment extends Fragment {
|
||||
public class AttendanceFragment extends Fragment {
|
||||
|
||||
private App app = null;
|
||||
private MainActivity activity = null;
|
||||
private FragmentRegisterAttendancesBinding b = null;
|
||||
private FragmentAttendanceBinding b = null;
|
||||
|
||||
private int displayMode = MODE_YEAR;
|
||||
private static final int MODE_YEAR = 0;
|
||||
@ -84,7 +82,7 @@ public class RegisterAttendancesFragment extends Fragment {
|
||||
if (app.profile == null)
|
||||
return inflater.inflate(R.layout.fragment_loading, container, false);
|
||||
// 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());
|
||||
return b.getRoot();
|
||||
}
|
||||
@ -106,14 +104,14 @@ public class RegisterAttendancesFragment extends Fragment {
|
||||
);
|
||||
|
||||
/*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.setMaxProgress(100.0f);
|
||||
|
||||
b.attendancesSummaryTitle.setOnClickListener((v -> {
|
||||
PopupMenu popupMenu = new PopupMenu(activity, b.attendancesSummaryTitle, Gravity.END);
|
||||
b.attendanceSummaryTitle.setOnClickListener((v -> {
|
||||
PopupMenu popupMenu = new PopupMenu(activity, b.attendanceSummaryTitle, Gravity.END);
|
||||
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, 2, 2, R.string.summary_mode_semester_2);
|
||||
@ -126,11 +124,11 @@ public class RegisterAttendancesFragment extends Fragment {
|
||||
}));
|
||||
|
||||
if (app.profile.getLoginStoreType() == LOGIN_TYPE_MOBIDZIENNIK) {
|
||||
long attendancesLastSync = app.profile.getStudentData("attendancesLastSync", (long)0);
|
||||
if (attendancesLastSync == 0) {
|
||||
attendancesLastSync = app.profile.getSemesterStart(1).getInMillis();
|
||||
long attendanceLastSync = app.profile.getStudentData("attendanceLastSync", (long)0);
|
||||
if (attendanceLastSync == 0) {
|
||||
attendanceLastSync = app.profile.getSemesterStart(1).getInMillis();
|
||||
}
|
||||
Date lastSyncDate = Date.fromMillis(attendancesLastSync);
|
||||
Date lastSyncDate = Date.fromMillis(attendanceLastSync);
|
||||
if (lastSyncDate.getValue() < Week.getWeekStart().getValue()) {
|
||||
CafeBar.builder(activity)
|
||||
.to(activity.getNavView().getCoordinator())
|
||||
@ -158,13 +156,13 @@ public class RegisterAttendancesFragment extends Fragment {
|
||||
}
|
||||
|
||||
if (app.profile.getLoginStoreType() == LOGIN_TYPE_MOBIDZIENNIK && false) {
|
||||
b.attendancesSummarySubject.setVisibility(View.GONE);
|
||||
b.attendanceSummarySubject.setVisibility(View.GONE);
|
||||
}
|
||||
else {
|
||||
b.attendancesSummarySubject.setOnClickListener((v -> {
|
||||
b.attendanceSummarySubject.setOnClickListener((v -> {
|
||||
AsyncTask.execute(() -> {
|
||||
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);
|
||||
int index = 0;
|
||||
DecimalFormat format = new DecimalFormat("0.00");
|
||||
@ -180,7 +178,7 @@ public class RegisterAttendancesFragment extends Fragment {
|
||||
}
|
||||
popupMenu.setOnMenuItemClickListener((item -> {
|
||||
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();
|
||||
return true;
|
||||
}));
|
||||
@ -192,20 +190,20 @@ public class RegisterAttendancesFragment extends Fragment {
|
||||
|
||||
LinearLayoutManager linearLayoutManager = new LinearLayoutManager(getContext());
|
||||
|
||||
b.attendancesView.setHasFixedSize(true);
|
||||
b.attendancesView.setLayoutManager(linearLayoutManager);
|
||||
b.attendanceView.setHasFixedSize(true);
|
||||
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())
|
||||
return;
|
||||
|
||||
if (attendances == null) {
|
||||
b.attendancesView.setVisibility(View.GONE);
|
||||
b.attendancesNoData.setVisibility(View.VISIBLE);
|
||||
if (attendance == null) {
|
||||
b.attendanceView.setVisibility(View.GONE);
|
||||
b.attendanceNoData.setVisibility(View.VISIBLE);
|
||||
return;
|
||||
}
|
||||
|
||||
attendanceList = attendances;
|
||||
attendanceList = attendance;
|
||||
|
||||
countSubjectStats();
|
||||
|
||||
@ -274,29 +272,29 @@ public class RegisterAttendancesFragment extends Fragment {
|
||||
}
|
||||
}
|
||||
if (filteredList.size() > 0) {
|
||||
AttendancesAdapter adapter;
|
||||
b.attendancesView.setVisibility(View.VISIBLE);
|
||||
b.attendancesNoData.setVisibility(View.GONE);
|
||||
if ((adapter = (AttendancesAdapter) b.attendancesView.getAdapter()) != null) {
|
||||
AttendanceAdapter adapter;
|
||||
b.attendanceView.setVisibility(View.VISIBLE);
|
||||
b.attendanceNoData.setVisibility(View.GONE);
|
||||
if ((adapter = (AttendanceAdapter) b.attendanceView.getAdapter()) != null) {
|
||||
adapter.attendanceList = filteredList;
|
||||
adapter.notifyDataSetChanged();
|
||||
}
|
||||
else {
|
||||
adapter = new AttendancesAdapter(getContext(), filteredList);
|
||||
b.attendancesView.setAdapter(adapter);
|
||||
adapter = new AttendanceAdapter(getContext(), filteredList);
|
||||
b.attendanceView.setAdapter(adapter);
|
||||
}
|
||||
}
|
||||
else {
|
||||
b.attendancesView.setVisibility(View.GONE);
|
||||
b.attendancesNoData.setVisibility(View.VISIBLE);
|
||||
b.attendanceView.setVisibility(View.GONE);
|
||||
b.attendanceNoData.setVisibility(View.VISIBLE);
|
||||
}
|
||||
|
||||
// SUMMARY
|
||||
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 {
|
||||
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.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.os.AsyncTask;
|
||||
@ -9,10 +9,6 @@ import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.Toast;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.appcompat.widget.PopupMenu;
|
||||
@ -22,22 +18,26 @@ import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
|
||||
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.R;
|
||||
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.NoticeFull;
|
||||
import pl.szczodrzynski.edziennik.databinding.FragmentBehaviourBinding;
|
||||
import pl.szczodrzynski.edziennik.utils.Themes;
|
||||
import pl.szczodrzynski.navlib.bottomsheet.items.BottomSheetPrimaryItem;
|
||||
|
||||
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 MainActivity activity = null;
|
||||
private FragmentRegisterNoticesBinding b = null;
|
||||
private FragmentBehaviourBinding b = null;
|
||||
|
||||
private int displayMode = MODE_YEAR;
|
||||
private static final int MODE_YEAR = 0;
|
||||
@ -56,7 +56,7 @@ public class RegisterNoticesFragment extends Fragment {
|
||||
if (app.profile == null)
|
||||
return inflater.inflate(R.layout.fragment_loading, container, false);
|
||||
// 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());
|
||||
return b.getRoot();
|
||||
}
|
||||
@ -78,7 +78,7 @@ public class RegisterNoticesFragment extends Fragment {
|
||||
);
|
||||
|
||||
/*b.refreshLayout.setOnRefreshListener(() -> {
|
||||
activity.syncCurrentFeature(MainActivity.DRAWER_ITEM_NOTICES, b.refreshLayout);
|
||||
activity.syncCurrentFeature(MainActivity.DRAWER_ITEM_BEHAVIOUR, b.refreshLayout);
|
||||
});*/
|
||||
|
||||
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.graphics.PorterDuff
|
@ -21,14 +21,14 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import pl.szczodrzynski.edziennik.App;
|
||||
import pl.szczodrzynski.edziennik.R;
|
||||
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.GradeFull;
|
||||
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.models.ItemGradesSubjectModel;
|
||||
import pl.szczodrzynski.navlib.bottomsheet.items.BottomSheetPrimaryItem;
|
||||
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_SUBJECT_ASC;
|
||||
|
||||
public class RegisterGradesFragment extends Fragment {
|
||||
public class GradesFragment extends Fragment {
|
||||
|
||||
private App app = null;
|
||||
private MainActivity activity = null;
|
||||
private FragmentRegisterGradesBinding b = null;
|
||||
private FragmentGradesBinding b = null;
|
||||
|
||||
@Override
|
||||
public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||
@ -58,7 +58,7 @@ public class RegisterGradesFragment extends Fragment {
|
||||
if (app.profile == null)
|
||||
return inflater.inflate(R.layout.fragment_loading, container, false);
|
||||
// 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.setNestedScrollingEnabled(true);
|
||||
return b.getRoot();
|
@ -35,14 +35,14 @@ import java.util.List;
|
||||
|
||||
import pl.szczodrzynski.edziennik.App;
|
||||
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.Edziennik;
|
||||
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.profiles.Profile;
|
||||
import pl.szczodrzynski.edziennik.data.db.modules.profiles.ProfileFull;
|
||||
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.Themes;
|
||||
|
||||
@ -50,7 +50,7 @@ public class MessagesComposeActivity extends AppCompatActivity {
|
||||
|
||||
private static final String TAG = "MessageCompose";
|
||||
private App app;
|
||||
private MessagesComposeActivityBinding b;
|
||||
private ActivityComposeMessageBinding b;
|
||||
private List<Teacher> teachers = new ArrayList<>();
|
||||
private ActionBar actionBar;
|
||||
private MessagesComposeInfo composeInfo;
|
||||
@ -60,7 +60,7 @@ public class MessagesComposeActivity extends AppCompatActivity {
|
||||
super.onCreate(savedInstanceState);
|
||||
app = (App)getApplication();
|
||||
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());
|
||||
|
||||
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.Handler;
|
||||
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.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
@ -39,6 +33,13 @@ import android.widget.ProgressBar;
|
||||
import android.widget.TextView;
|
||||
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.StackingBehavior;
|
||||
|
||||
@ -51,7 +52,7 @@ import java.util.Date;
|
||||
|
||||
import pl.szczodrzynski.edziennik.App;
|
||||
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.Themes;
|
||||
|
||||
@ -59,12 +60,12 @@ import static android.app.Activity.RESULT_OK;
|
||||
import static android.content.Context.DOWNLOAD_SERVICE;
|
||||
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 App app = null;
|
||||
private Activity activity = null;
|
||||
private FragmentRegisterMessagesWebBinding b = null;
|
||||
private FragmentMessagesWebBinding b = null;
|
||||
|
||||
private WebView webView;
|
||||
private ProgressBar progressBar;
|
||||
@ -80,7 +81,7 @@ public class RegisterMessagesWebFragment extends Fragment {
|
||||
if (app.profile == null)
|
||||
return inflater.inflate(R.layout.fragment_loading, container, false);
|
||||
// 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();
|
||||
}
|
||||
|
||||
@ -350,7 +351,7 @@ public class RegisterMessagesWebFragment extends Fragment {
|
||||
@Override
|
||||
public void onPageStarted(WebView view, String url, Bitmap favicon) {
|
||||
super.onPageStarted(view, url, favicon);
|
||||
RegisterMessagesWebFragment.this.error.setVisibility(View.GONE);
|
||||
MessagesWebFragment.this.error.setVisibility(View.GONE);
|
||||
loadingFinished = false;
|
||||
//SHOW LOADING IF IT ISNT ALREADY 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())
|
||||
return;
|
||||
|
||||
RegisterMessagesWebFragment.this.error.setVisibility(View.VISIBLE);
|
||||
RegisterMessagesWebFragment.this.error.setText(getString(R.string.error_occured_format, error.toString()));
|
||||
MessagesWebFragment.this.error.setVisibility(View.VISIBLE);
|
||||
MessagesWebFragment.this.error.setText(getString(R.string.error_occured_format, error.toString()));
|
||||
super.onReceivedError(view, request, error);
|
||||
}
|
||||
});
|
@ -2,26 +2,27 @@ package pl.szczodrzynski.edziennik.ui.modules.notifications;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.databinding.DataBindingUtil;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
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.R;
|
||||
import pl.szczodrzynski.edziennik.databinding.FragmentRegisterNotificationsBinding;
|
||||
import pl.szczodrzynski.edziennik.databinding.FragmentNotificationsBinding;
|
||||
import pl.szczodrzynski.edziennik.utils.Themes;
|
||||
|
||||
public class RegisterNotificationsFragment extends Fragment {
|
||||
public class NotificationsFragment extends Fragment {
|
||||
|
||||
private App app = null;
|
||||
private Activity activity = null;
|
||||
private FragmentRegisterNotificationsBinding b = null;
|
||||
private FragmentNotificationsBinding b = null;
|
||||
|
||||
@Override
|
||||
public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||
@ -33,7 +34,7 @@ public class RegisterNotificationsFragment extends Fragment {
|
||||
if (app.profile == null)
|
||||
return inflater.inflate(R.layout.fragment_loading, container, false);
|
||||
// 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();
|
||||
}
|
||||
|
@ -351,8 +351,8 @@ public class SettingsNewFragment extends MaterialAboutFragment {
|
||||
buttonIds.add(MainActivity.DRAWER_ITEM_GRADES);
|
||||
buttonIds.add(MainActivity.DRAWER_ITEM_MESSAGES);
|
||||
buttonIds.add(MainActivity.DRAWER_ITEM_HOMEWORK);
|
||||
buttonIds.add(MainActivity.DRAWER_ITEM_NOTICES);
|
||||
buttonIds.add(MainActivity.DRAWER_ITEM_ATTENDANCES);
|
||||
buttonIds.add(MainActivity.DRAWER_ITEM_BEHAVIOUR);
|
||||
buttonIds.add(MainActivity.DRAWER_ITEM_ATTENDANCE);
|
||||
buttonIds.add(MainActivity.DRAWER_ITEM_ANNOUNCEMENTS);
|
||||
buttonIds.add(MainActivity.DRAWER_ITEM_NOTIFICATIONS);
|
||||
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_homework));
|
||||
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_notifications));
|
||||
buttonCaptions.add(getString(R.string.menu_settings));
|
||||
@ -1101,8 +1101,8 @@ public class SettingsNewFragment extends MaterialAboutFragment {
|
||||
case "Notices":
|
||||
stringRes = R.string.settings_sync_customize_endpoint_notices;
|
||||
break;
|
||||
case "Attendances":
|
||||
stringRes = R.string.settings_sync_customize_endpoint_attendances;
|
||||
case "Attendance":
|
||||
stringRes = R.string.settings_sync_customize_endpoint_attendance;
|
||||
break;
|
||||
case "Announcements":
|
||||
stringRes = R.string.settings_sync_customize_endpoint_announcements;
|
||||
|
@ -1,6 +1,10 @@
|
||||
package pl.szczodrzynski.edziennik.ui.modules.timetable;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.databinding.DataBindingUtil;
|
||||
@ -8,25 +12,21 @@ import androidx.fragment.app.Fragment;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import pl.szczodrzynski.edziennik.App;
|
||||
import pl.szczodrzynski.edziennik.R;
|
||||
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.Time;
|
||||
import pl.szczodrzynski.edziennik.utils.Themes;
|
||||
|
||||
public class RegisterTimetableDayFragment extends Fragment {
|
||||
public class TimetableDayFragment extends Fragment {
|
||||
|
||||
private App app = null;
|
||||
private MainActivity activity = null;
|
||||
private FragmentRegisterTimetableDayBinding b = null;
|
||||
private FragmentTimetableDayBinding b = null;
|
||||
|
||||
private RecyclerView recyclerView;
|
||||
|
||||
@ -40,7 +40,7 @@ public class RegisterTimetableDayFragment extends Fragment {
|
||||
if (app.profile == null)
|
||||
return inflater.inflate(R.layout.fragment_loading, container, false);
|
||||
// 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());
|
||||
return b.getRoot();
|
||||
}
|
@ -14,18 +14,6 @@ import android.net.Uri;
|
||||
import android.os.AsyncTask;
|
||||
import android.os.Build;
|
||||
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.text.Html;
|
||||
import android.util.Log;
|
||||
@ -36,7 +24,18 @@ import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
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.google.android.material.tabs.TabLayout;
|
||||
import com.mikepenz.iconics.typeface.library.community.material.CommunityMaterial;
|
||||
|
||||
import java.io.File;
|
||||
@ -47,18 +46,18 @@ import java.util.List;
|
||||
import java.util.TreeMap;
|
||||
|
||||
import pl.szczodrzynski.edziennik.App;
|
||||
import pl.szczodrzynski.edziennik.R;
|
||||
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.databinding.FragmentTimetableBinding;
|
||||
import pl.szczodrzynski.edziennik.ui.dialogs.event.EventManualDialog;
|
||||
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.Themes;
|
||||
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.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.d;
|
||||
|
||||
public class RegisterTimetableFragment extends Fragment {
|
||||
public class TimetableFragment extends Fragment {
|
||||
private static final String TAG = "RegisterTimetable";
|
||||
|
||||
private App app = null;
|
||||
private MainActivity activity = null;
|
||||
private FragmentRegisterTimetableBinding b = null;
|
||||
private FragmentTimetableBinding b = null;
|
||||
|
||||
private ViewPager viewPager;
|
||||
private static int pageSelection = -1;
|
||||
@ -89,7 +88,7 @@ public class RegisterTimetableFragment extends Fragment {
|
||||
if (app.profile == null)
|
||||
return inflater.inflate(R.layout.fragment_loading, container, false);
|
||||
// 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();
|
||||
}
|
||||
|
||||
@ -154,13 +153,13 @@ public class RegisterTimetableFragment extends Fragment {
|
||||
for (int i = 0; i < app.appConfig.timetableDisplayDaysForward + app.appConfig.timetableDisplayDaysBackward + 1; i++) {
|
||||
Bundle args = new Bundle();
|
||||
args.putLong("date", date.getValue());
|
||||
RegisterTimetableDayFragment registerTimetableDayFragment = new RegisterTimetableDayFragment();
|
||||
registerTimetableDayFragment.setArguments(args);
|
||||
TimetableDayFragment timetableDayFragment = new TimetableDayFragment();
|
||||
timetableDayFragment.setArguments(args);
|
||||
StringBuilder pageTitle = new StringBuilder(Week.getFullDayName(date.getWeekDay()));
|
||||
if (i > weekEnd || i < weekBeginning) {
|
||||
pageTitle.append(", ").append(date.getStringDm());
|
||||
}
|
||||
adapter.addFragment(registerTimetableDayFragment, pageTitle.toString());
|
||||
adapter.addFragment(timetableDayFragment, pageTitle.toString());
|
||||
date.stepForward(0, 0, 1);
|
||||
}
|
||||
viewPager.setAdapter(adapter);
|
@ -27,7 +27,7 @@
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/attendancesSummaryTitle"
|
||||
android:id="@+id/attendanceSummaryTitle"
|
||||
style="@style/Widget.AppCompat.Spinner"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
@ -36,7 +36,7 @@
|
||||
android:textSize="20sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/attendancesSummarySubject"
|
||||
android:id="@+id/attendanceSummarySubject"
|
||||
style="@style/Widget.AppCompat.Spinner"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
@ -168,7 +168,7 @@
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/attendancesView"
|
||||
android:id="@+id/attendance_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="8dp"
|
||||
@ -177,7 +177,7 @@
|
||||
</androidx.recyclerview.widget.RecyclerView>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/attendancesNoData"
|
||||
android:id="@+id/attendance_no_data"
|
||||
android:layout_width="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center"
|
||||
@ -206,4 +206,4 @@
|
||||
</FrameLayout>
|
||||
</LinearLayout>
|
||||
</pl.szczodrzynski.edziennik.utils.SwipeRefreshLayoutNoIndicator>
|
||||
</layout>
|
||||
</layout>
|
@ -69,8 +69,8 @@
|
||||
<string name="attendances_releases">Releases:</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_semester_format">Summary - semester %d </string>
|
||||
<string name="attendances_summary_title_year">Summary - all year </string>
|
||||
<string name="attendance_summary_title_semester_format">Summary - semester %d </string>
|
||||
<string name="attendance_summary_title_year">Summary - all year </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_error">Incorrect format</string>
|
||||
@ -401,7 +401,7 @@
|
||||
<string name="menu_add_new_profile">Add a new student</string>
|
||||
<string name="menu_agenda">Agenda</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_editor">Grade editing simulator</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_text">Enable Event sharing</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_classrooms">Classrooms</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_announcements">Getting notice board</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_grades">Getting behaviour grades</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_all">All</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_homework">Syncing homework…</string>
|
||||
<string name="sync_feature_messages_inbox">Syncing received messages…</string>
|
||||
|
@ -76,8 +76,8 @@
|
||||
<string name="attendances_releases">Zwolnienia:</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_semester_format">Podsumowanie - semestr %d </string>
|
||||
<string name="attendances_summary_title_year">Podsumowanie - cały rok </string>
|
||||
<string name="attendance_summary_title_semester_format">Podsumowanie - semestr %d </string>
|
||||
<string name="attendance_summary_title_year">Podsumowanie - cały rok </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_error">Nieprawidłowy format</string>
|
||||
@ -425,7 +425,7 @@
|
||||
<string name="menu_add_new_profile">Dodaj nowego ucznia</string>
|
||||
<string name="menu_agenda">Terminarz</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_desc">Generuje plan lekcji na cały tydzień</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_text">Włącz Udostępnianie wydarzeń</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_classrooms">Sale lekcyjne</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_announcements">Pobieranie ogłoszeń szkolnych</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_grades">Pobieranie ocen z zachowania</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_all">Wszystkie</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_homework">Pobieram zadania domowe…</string>
|
||||
<string name="sync_feature_messages_inbox">Pobieram wiadomości odebrane…</string>
|
||||
|
Loading…
x
Reference in New Issue
Block a user