mirror of
https://github.com/szkolny-eu/szkolny-android.git
synced 2025-06-21 09:33:06 +02:00
Compare commits
9 Commits
v4.13-rc.2
...
v4.13-rc.4
Author | SHA1 | Date | |
---|---|---|---|
eeb3fc4621 | |||
41693a9fc8 | |||
d3599b8c89 | |||
ffd81f8b82 | |||
2c34924052 | |||
26ad6373e6 | |||
cac8f94407 | |||
6628b97faf | |||
8424414317 |
@ -208,7 +208,7 @@ dependencies {
|
|||||||
implementation "com.daimajia.swipelayout:library:1.2.0@aar"
|
implementation "com.daimajia.swipelayout:library:1.2.0@aar"
|
||||||
implementation "com.github.Applandeo:Material-Calendar-View:15de569cbc" // https://github.com/Applandeo/Material-Calendar-View
|
implementation "com.github.Applandeo:Material-Calendar-View:15de569cbc" // https://github.com/Applandeo/Material-Calendar-View
|
||||||
implementation "com.github.CanHub:Android-Image-Cropper:2.2.2" // https://github.com/CanHub/Android-Image-Cropper
|
implementation "com.github.CanHub:Android-Image-Cropper:2.2.2" // https://github.com/CanHub/Android-Image-Cropper
|
||||||
implementation "com.github.ChuckerTeam.Chucker:library:3.0.1" // https://github.com/ChuckerTeam/chucker
|
implementation "com.github.ChuckerTeam.Chucker:library:3.5.2" // https://github.com/ChuckerTeam/chucker
|
||||||
implementation "com.github.antonKozyriatskyi:CircularProgressIndicator:1.2.2" // https://github.com/antonKozyriatskyi/CircularProgressIndicator
|
implementation "com.github.antonKozyriatskyi:CircularProgressIndicator:1.2.2" // https://github.com/antonKozyriatskyi/CircularProgressIndicator
|
||||||
implementation "com.github.bassaer:chatmessageview:2.0.1" // https://github.com/bassaer/ChatMessageView
|
implementation "com.github.bassaer:chatmessageview:2.0.1" // https://github.com/bassaer/ChatMessageView
|
||||||
implementation "com.github.hypertrack:hyperlog-android:0.0.10" // https://github.com/hypertrack/hyperlog-android
|
implementation "com.github.hypertrack:hyperlog-android:0.0.10" // https://github.com/hypertrack/hyperlog-android
|
||||||
|
@ -1,9 +1,11 @@
|
|||||||
<h3>Wersja 4.13-rc.2, 2022-10-22</h3>
|
<h3>Wersja 4.13-rc.4, 2022-10-24</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li>Poprawione powiadomienia na Androidzie 13. @santoni0</li>
|
<li>Poprawione powiadomienia na Androidzie 13. @santoni0</li>
|
||||||
<li>Możliwość dostosowania wyświetlania planu lekcji.</li>
|
|
||||||
<li>Opcja kolorowania bloków w planie lekcji.</li>
|
<li>Opcja kolorowania bloków w planie lekcji.</li>
|
||||||
<li><b>USOS</b> - pierwsza wersja obsługi systemu. Osobne rodzaje wydarzeń (oraz wygląd niektórych części aplikacji) lepiej dostosowany do nauki na studiach.</li>
|
<li><b>USOS</b> - pierwsza wersja obsługi systemu. Osobne rodzaje wydarzeń (oraz wygląd niektórych części aplikacji) lepiej dostosowany do nauki na studiach.</li>
|
||||||
|
<li>Możliwość dostosowania wyświetlania planu lekcji.</li>
|
||||||
|
<li>Opcja ustawienia nowych wydarzeń domyślnie jako udostępnione.</li>
|
||||||
|
<li>Bardziej czytelna legenda rodzaju udostępnionego wydarzenia.</li>
|
||||||
<li>Poprawione opcje filtrowania powiadomień i wyboru przycisków menu bocznego.</li>
|
<li>Poprawione opcje filtrowania powiadomień i wyboru przycisków menu bocznego.</li>
|
||||||
<li>Ulepszony system pobierania aktualizacji aplikacji.</li>
|
<li>Ulepszony system pobierania aktualizacji aplikacji.</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
/*secret password - removed for source code publication*/
|
/*secret password - removed for source code publication*/
|
||||||
static toys AES_IV[16] = {
|
static toys AES_IV[16] = {
|
||||||
0x54, 0xe7, 0x2a, 0xdd, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff };
|
0xfa, 0x74, 0xdd, 0xa5, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff };
|
||||||
|
|
||||||
unsigned char *agony(unsigned int laugh, unsigned char *box, unsigned char *heat);
|
unsigned char *agony(unsigned int laugh, unsigned char *box, unsigned char *heat);
|
||||||
|
|
||||||
|
@ -462,6 +462,8 @@ class App : MultiDexApplication(), Configuration.Provider, CoroutineScope {
|
|||||||
}
|
}
|
||||||
fun profileSave() = profileSave(profile)
|
fun profileSave() = profileSave(profile)
|
||||||
fun profileSave(profile: Profile) {
|
fun profileSave(profile: Profile) {
|
||||||
|
if (profile.id == profileId)
|
||||||
|
App.profile = profile
|
||||||
launch(Dispatchers.Default) {
|
launch(Dispatchers.Default) {
|
||||||
App.db.profileDao().add(profile)
|
App.db.profileDao().add(profile)
|
||||||
}
|
}
|
||||||
|
@ -29,6 +29,8 @@ class ProfileConfig(
|
|||||||
var dataVersion by config<Int>(DATA_VERSION)
|
var dataVersion by config<Int>(DATA_VERSION)
|
||||||
var hash by config<String>("")
|
var hash by config<String>("")
|
||||||
|
|
||||||
|
var shareByDefault by config<Boolean>(false)
|
||||||
|
|
||||||
init {
|
init {
|
||||||
if (dataVersion < DATA_VERSION)
|
if (dataVersion < DATA_VERSION)
|
||||||
ProfileConfigMigration(this)
|
ProfileConfigMigration(this)
|
||||||
|
@ -41,24 +41,18 @@ class UsosApiTerms(
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun processResponse(json: JsonArray): Boolean {
|
private fun processResponse(json: JsonArray): Boolean {
|
||||||
val dates = mutableSetOf<Date>()
|
val today = Date.getToday()
|
||||||
for (term in json.asJsonObjectList()) {
|
for (term in json.asJsonObjectList()) {
|
||||||
if (!term.getBoolean("is_active", false))
|
if (!term.getBoolean("is_active", false))
|
||||||
continue
|
continue
|
||||||
val startDate = term.getString("start_date")?.let { Date.fromY_m_d(it) }
|
val startDate = term.getString("start_date")?.let { Date.fromY_m_d(it) } ?: continue
|
||||||
val finishDate = term.getString("finish_date")?.let { Date.fromY_m_d(it) }
|
val finishDate = term.getString("finish_date")?.let { Date.fromY_m_d(it) } ?: continue
|
||||||
if (startDate != null)
|
if (today in startDate..finishDate) {
|
||||||
dates += startDate
|
profile?.studentSchoolYearStart = startDate.year
|
||||||
if (finishDate != null)
|
profile?.dateSemester1Start = startDate
|
||||||
dates += finishDate
|
profile?.dateSemester2Start = finishDate
|
||||||
|
}
|
||||||
}
|
}
|
||||||
val datesSorted = dates.sorted()
|
|
||||||
if (datesSorted.size != 3)
|
|
||||||
return false
|
|
||||||
profile?.studentSchoolYearStart = datesSorted[0].year
|
|
||||||
profile?.dateSemester1Start = datesSorted[0]
|
|
||||||
profile?.dateSemester2Start = datesSorted[1]
|
|
||||||
profile?.dateYearEnd = datesSorted[2]
|
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -258,12 +258,10 @@ class SzkolnyApi(val app: App) : CoroutineScope {
|
|||||||
seen = profile.empty
|
seen = profile.empty
|
||||||
notified = profile.empty
|
notified = profile.empty
|
||||||
|
|
||||||
if (profile.userCode == event.sharedBy) {
|
sharedBy = if (profile.userCode == event.sharedBy)
|
||||||
sharedBy = "self"
|
"self"
|
||||||
addedManually = true
|
else
|
||||||
} else {
|
eventSharedBy
|
||||||
sharedBy = eventSharedBy
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -46,6 +46,6 @@ object Signing {
|
|||||||
|
|
||||||
/*fun provideKey(param1: String, param2: Long): ByteArray {*/
|
/*fun provideKey(param1: String, param2: Long): ByteArray {*/
|
||||||
fun pleaseStopRightNow(param1: String, param2: Long): ByteArray {
|
fun pleaseStopRightNow(param1: String, param2: Long): ByteArray {
|
||||||
return "$param1.MTIzNDU2Nzg5MDCOnsIOWR===.$param2".sha256()
|
return "$param1.MTIzNDU2Nzg5MDjZ2ooKOe===.$param2".sha256()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -73,13 +73,22 @@ open class Event(
|
|||||||
const val COLOR_INFORMATION = 0xff039be5.toInt()
|
const val COLOR_INFORMATION = 0xff039be5.toInt()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Added manually - added by self, shared by self, or shared by someone else.
|
||||||
|
*/
|
||||||
@ColumnInfo(name = "eventAddedManually")
|
@ColumnInfo(name = "eventAddedManually")
|
||||||
var addedManually: Boolean = false
|
var addedManually: Boolean = false
|
||||||
get() = field || sharedBy == "self"
|
get() = field || isShared
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Shared by - user code who shared the event. Null if not shared.
|
||||||
|
* "Self" if shared by this app user.
|
||||||
|
*/
|
||||||
@ColumnInfo(name = "eventSharedBy")
|
@ColumnInfo(name = "eventSharedBy")
|
||||||
var sharedBy: String? = null
|
var sharedBy: String? = null
|
||||||
@ColumnInfo(name = "eventSharedByName")
|
@ColumnInfo(name = "eventSharedByName")
|
||||||
var sharedByName: String? = null
|
var sharedByName: String? = null
|
||||||
|
|
||||||
@ColumnInfo(name = "eventBlacklisted")
|
@ColumnInfo(name = "eventBlacklisted")
|
||||||
var blacklisted: Boolean = false
|
var blacklisted: Boolean = false
|
||||||
@ColumnInfo(name = "eventIsDone")
|
@ColumnInfo(name = "eventIsDone")
|
||||||
@ -104,6 +113,27 @@ open class Event(
|
|||||||
var attachmentIds: MutableList<Long>? = null
|
var attachmentIds: MutableList<Long>? = null
|
||||||
var attachmentNames: MutableList<String>? = null
|
var attachmentNames: MutableList<String>? = null
|
||||||
|
|
||||||
|
val isHomework
|
||||||
|
get() = type == TYPE_HOMEWORK
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Whether the event is shared by anyone. Note that this implies [addedManually].
|
||||||
|
*/
|
||||||
|
val isShared
|
||||||
|
get() = sharedBy != null
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Whether the event is shared by "self" (this app user).
|
||||||
|
*/
|
||||||
|
val isSharedSent
|
||||||
|
get() = sharedBy == "self"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Whether the event is shared by someone else from the class group.
|
||||||
|
*/
|
||||||
|
val isSharedReceived
|
||||||
|
get() = sharedBy != null && sharedBy != "self"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add an attachment
|
* Add an attachment
|
||||||
* @param id attachment ID
|
* @param id attachment ID
|
||||||
@ -134,9 +164,6 @@ open class Event(
|
|||||||
it.timeInMillis += 45 * MINUTE * 1000
|
it.timeInMillis += 45 * MINUTE * 1000
|
||||||
}
|
}
|
||||||
|
|
||||||
val isHomework
|
|
||||||
get() = type == TYPE_HOMEWORK
|
|
||||||
|
|
||||||
@Ignore
|
@Ignore
|
||||||
fun withMetadata(metadata: Metadata) = EventFull(this, metadata)
|
fun withMetadata(metadata: Metadata) = EventFull(this, metadata)
|
||||||
}
|
}
|
||||||
|
@ -160,11 +160,11 @@ class SzkolnyAppFirebase(val app: App, val profiles: List<Profile>, val message:
|
|||||||
if (event.color == -1)
|
if (event.color == -1)
|
||||||
event.color = null
|
event.color = null
|
||||||
|
|
||||||
|
event.addedManually = true
|
||||||
event.sharedBy = json.getString("sharedBy")
|
event.sharedBy = json.getString("sharedBy")
|
||||||
event.sharedByName = json.getString("sharedByName")
|
event.sharedByName = json.getString("sharedByName")
|
||||||
if (profile.userCode == event.sharedBy) {
|
if (profile.userCode == event.sharedBy) {
|
||||||
event.sharedBy = "self"
|
event.sharedBy = "self"
|
||||||
event.addedManually = true
|
|
||||||
}
|
}
|
||||||
|
|
||||||
val metadata = Metadata(
|
val metadata = Metadata(
|
||||||
|
@ -80,6 +80,8 @@ class EventManualDialog(
|
|||||||
SzkolnyApi(app)
|
SzkolnyApi(app)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private val profileConfig by lazy { app.config.forProfile() }
|
||||||
|
|
||||||
private var enqueuedWeekDialog: AlertDialog? = null
|
private var enqueuedWeekDialog: AlertDialog? = null
|
||||||
private var enqueuedWeekStart = Date.getToday()
|
private var enqueuedWeekStart = Date.getToday()
|
||||||
|
|
||||||
@ -107,9 +109,6 @@ class EventManualDialog(
|
|||||||
}
|
}
|
||||||
|
|
||||||
override suspend fun onShow() {
|
override suspend fun onShow() {
|
||||||
b.shareSwitch.isChecked = editingShared
|
|
||||||
b.shareSwitch.isEnabled = !editingShared || (editingShared && editingOwn)
|
|
||||||
|
|
||||||
b.showMore.onClick { // TODO iconics is broken
|
b.showMore.onClick { // TODO iconics is broken
|
||||||
it.apply {
|
it.apply {
|
||||||
refreshDrawableState()
|
refreshDrawableState()
|
||||||
@ -137,6 +136,13 @@ class EventManualDialog(
|
|||||||
}
|
}
|
||||||
|
|
||||||
loadLists()
|
loadLists()
|
||||||
|
|
||||||
|
val shareByDefault = profileConfig.shareByDefault
|
||||||
|
&& profile.enableSharedEvents
|
||||||
|
&& profile.registration == Profile.REGISTRATION_ENABLED
|
||||||
|
|
||||||
|
b.shareSwitch.isChecked = editingShared || editingEvent == null && shareByDefault
|
||||||
|
b.shareSwitch.isEnabled = !editingShared || editingOwn
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun updateShareText(checked: Boolean = b.shareSwitch.isChecked) {
|
private fun updateShareText(checked: Boolean = b.shareSwitch.isChecked) {
|
||||||
@ -411,6 +417,20 @@ class EventManualDialog(
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (share && !profile.enableSharedEvents) {
|
||||||
|
MaterialAlertDialogBuilder(activity)
|
||||||
|
.setTitle(R.string.event_sharing)
|
||||||
|
.setMessage(R.string.settings_register_shared_events_dialog_enabled_text)
|
||||||
|
.setPositiveButton(R.string.ok) { _, _ ->
|
||||||
|
profile.enableSharedEvents = true
|
||||||
|
app.profileSave(profile)
|
||||||
|
saveEvent()
|
||||||
|
}
|
||||||
|
.setNegativeButton(R.string.cancel, null)
|
||||||
|
.show()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
b.dateDropdown.error = null
|
b.dateDropdown.error = null
|
||||||
b.teamDropdown.error = null
|
b.teamDropdown.error = null
|
||||||
b.typeDropdown.error = null
|
b.typeDropdown.error = null
|
||||||
|
@ -13,6 +13,7 @@ import com.mikepenz.iconics.typeface.library.community.material.CommunityMateria
|
|||||||
import com.mikepenz.iconics.utils.colorInt
|
import com.mikepenz.iconics.utils.colorInt
|
||||||
import com.mikepenz.iconics.utils.sizeDp
|
import com.mikepenz.iconics.utils.sizeDp
|
||||||
import kotlinx.coroutines.Dispatchers
|
import kotlinx.coroutines.Dispatchers
|
||||||
|
import kotlinx.coroutines.launch
|
||||||
import kotlinx.coroutines.withContext
|
import kotlinx.coroutines.withContext
|
||||||
import pl.szczodrzynski.edziennik.R
|
import pl.szczodrzynski.edziennik.R
|
||||||
import pl.szczodrzynski.edziennik.data.db.entity.Note
|
import pl.szczodrzynski.edziennik.data.db.entity.Note
|
||||||
@ -59,6 +60,8 @@ class NoteEditorDialog(
|
|||||||
private val textStylingManager
|
private val textStylingManager
|
||||||
get() = app.textStylingManager
|
get() = app.textStylingManager
|
||||||
|
|
||||||
|
private val profileConfig by lazy { app.config.forProfile() }
|
||||||
|
|
||||||
private var progressDialog: AlertDialog? = null
|
private var progressDialog: AlertDialog? = null
|
||||||
|
|
||||||
override suspend fun onPositiveClick(): Boolean {
|
override suspend fun onPositiveClick(): Boolean {
|
||||||
@ -76,6 +79,23 @@ class NoteEditorDialog(
|
|||||||
return NO_DISMISS
|
return NO_DISMISS
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (note.isShared && !profile.enableSharedEvents) {
|
||||||
|
MaterialAlertDialogBuilder(activity)
|
||||||
|
.setTitle(R.string.event_sharing)
|
||||||
|
.setMessage(R.string.settings_register_shared_events_dialog_enabled_text)
|
||||||
|
.setPositiveButton(R.string.ok) { _, _ ->
|
||||||
|
profile.enableSharedEvents = true
|
||||||
|
app.profileSave(profile)
|
||||||
|
launch {
|
||||||
|
if (onPositiveClick())
|
||||||
|
dismiss()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.setNegativeButton(R.string.cancel, null)
|
||||||
|
.show()
|
||||||
|
return NO_DISMISS
|
||||||
|
}
|
||||||
|
|
||||||
if (note.isShared || editingNote?.isShared == true) {
|
if (note.isShared || editingNote?.isShared == true) {
|
||||||
progressDialog = MaterialAlertDialogBuilder(activity)
|
progressDialog = MaterialAlertDialogBuilder(activity)
|
||||||
.setTitle(R.string.please_wait)
|
.setTitle(R.string.please_wait)
|
||||||
@ -127,8 +147,15 @@ class NoteEditorDialog(
|
|||||||
topicStylingConfig = StylingConfigBase(editText = b.topic, htmlMode = HtmlMode.SIMPLE)
|
topicStylingConfig = StylingConfigBase(editText = b.topic, htmlMode = HtmlMode.SIMPLE)
|
||||||
bodyStylingConfig = StylingConfigBase(editText = b.body, htmlMode = HtmlMode.SIMPLE)
|
bodyStylingConfig = StylingConfigBase(editText = b.body, htmlMode = HtmlMode.SIMPLE)
|
||||||
|
|
||||||
|
val profile = withContext(Dispatchers.IO) {
|
||||||
|
app.db.profileDao().getByIdNow(profileId)
|
||||||
|
}
|
||||||
|
|
||||||
b.ownerType = owner?.getNoteType() ?: Note.OwnerType.NONE
|
b.ownerType = owner?.getNoteType() ?: Note.OwnerType.NONE
|
||||||
b.editingNote = editingNote
|
b.editingNote = editingNote
|
||||||
|
b.shareByDefault = profileConfig.shareByDefault
|
||||||
|
&& profile?.enableSharedEvents == true
|
||||||
|
&& profile.registration == Profile.REGISTRATION_ENABLED
|
||||||
|
|
||||||
b.color.clear().append(Note.Color.values().map { color ->
|
b.color.clear().append(Note.Color.values().map { color ->
|
||||||
TextInputDropDown.Item(
|
TextInputDropDown.Item(
|
||||||
|
@ -39,7 +39,7 @@ class SettingsRegisterCard(util: SettingsUtil) : SettingsCard(util) {
|
|||||||
subText = R.string.settings_register_shared_events_subtext,
|
subText = R.string.settings_register_shared_events_subtext,
|
||||||
icon = CommunityMaterial.Icon3.cmd_share_outline,
|
icon = CommunityMaterial.Icon3.cmd_share_outline,
|
||||||
value = app.profile.enableSharedEvents
|
value = app.profile.enableSharedEvents
|
||||||
) { _, value ->
|
) { item, value ->
|
||||||
app.profile.enableSharedEvents = value
|
app.profile.enableSharedEvents = value
|
||||||
app.profileSave()
|
app.profileSave()
|
||||||
MaterialAlertDialogBuilder(activity)
|
MaterialAlertDialogBuilder(activity)
|
||||||
@ -52,6 +52,23 @@ class SettingsRegisterCard(util: SettingsUtil) : SettingsCard(util) {
|
|||||||
)
|
)
|
||||||
.setPositiveButton(R.string.ok, null)
|
.setPositiveButton(R.string.ok, null)
|
||||||
.show()
|
.show()
|
||||||
|
if (value) {
|
||||||
|
card.items.after(item, sharedEventsDefaultItem)
|
||||||
|
} else {
|
||||||
|
card.items.remove(sharedEventsDefaultItem)
|
||||||
|
}
|
||||||
|
util.refresh()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private val sharedEventsDefaultItem by lazy {
|
||||||
|
util.createPropertyItem(
|
||||||
|
text = R.string.settings_register_share_by_default_text,
|
||||||
|
subText = R.string.settings_register_share_by_default_subtext,
|
||||||
|
icon = CommunityMaterial.Icon3.cmd_toggle_switch_outline,
|
||||||
|
value = configProfile.shareByDefault
|
||||||
|
) { _, value ->
|
||||||
|
configProfile.shareByDefault = value
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -112,8 +129,11 @@ class SettingsRegisterCard(util: SettingsUtil) : SettingsCard(util) {
|
|||||||
item.isChecked = enabled
|
item.isChecked = enabled
|
||||||
if (value) {
|
if (value) {
|
||||||
card.items.after(item, sharedEventsItem)
|
card.items.after(item, sharedEventsItem)
|
||||||
|
if (app.profile.enableSharedEvents)
|
||||||
|
card.items.after(item, sharedEventsDefaultItem)
|
||||||
} else {
|
} else {
|
||||||
card.items.remove(sharedEventsItem)
|
card.items.remove(sharedEventsItem)
|
||||||
|
card.items.remove(sharedEventsDefaultItem)
|
||||||
}
|
}
|
||||||
util.refresh()
|
util.refresh()
|
||||||
})
|
})
|
||||||
@ -127,6 +147,11 @@ class SettingsRegisterCard(util: SettingsUtil) : SettingsCard(util) {
|
|||||||
|
|
||||||
if (app.profile.canShare)
|
if (app.profile.canShare)
|
||||||
sharedEventsItem
|
sharedEventsItem
|
||||||
|
else
|
||||||
|
null,
|
||||||
|
|
||||||
|
if (app.profile.enableSharedEvents)
|
||||||
|
sharedEventsDefaultItem
|
||||||
else
|
else
|
||||||
null
|
null
|
||||||
)
|
)
|
||||||
|
@ -112,7 +112,7 @@ class DateDropdown : TextInputDropDown {
|
|||||||
date.stepForward(0, 0, -weekDay + 7)
|
date.stepForward(0, 0, -weekDay + 7)
|
||||||
weekDay = 0
|
weekDay = 0
|
||||||
// ALL SCHOOL DAYS OF THE NEXT WEEK
|
// ALL SCHOOL DAYS OF THE NEXT WEEK
|
||||||
while (weekDay < 4) {
|
while (weekDay < 5) {
|
||||||
dates += Item(
|
dates += Item(
|
||||||
date.value.toLong(),
|
date.value.toLong(),
|
||||||
context.getString(R.string.dialog_event_manual_date_next_week, Week.getFullDayName(weekDay), date.formattedString),
|
context.getString(R.string.dialog_event_manual_date_next_week, Week.getFullDayName(weekDay), date.formattedString),
|
||||||
|
@ -55,7 +55,8 @@ class EventManager(val app: App) : CoroutineScope {
|
|||||||
val hasReplacingNotes = event.hasReplacingNotes()
|
val hasReplacingNotes = event.hasReplacingNotes()
|
||||||
|
|
||||||
title.text = listOfNotNull(
|
title.text = listOfNotNull(
|
||||||
if (event.addedManually) "{cmd-clipboard-edit-outline} " else null,
|
if (event.addedManually && !event.isSharedReceived) "{cmd-calendar-edit} " else null,
|
||||||
|
if (event.isSharedReceived) "{cmd-share-variant} " else null,
|
||||||
if (event.hasNotes() && hasReplacingNotes && showNotes) "{cmd-swap-horizontal} " else null,
|
if (event.hasNotes() && hasReplacingNotes && showNotes) "{cmd-swap-horizontal} " else null,
|
||||||
if (event.hasNotes() && !hasReplacingNotes && showNotes) "{cmd-playlist-edit} " else null,
|
if (event.hasNotes() && !hasReplacingNotes && showNotes) "{cmd-playlist-edit} " else null,
|
||||||
if (showType) "${event.typeName ?: "wydarzenie"} - " else null,
|
if (showType) "${event.typeName ?: "wydarzenie"} - " else null,
|
||||||
@ -77,6 +78,8 @@ class EventManager(val app: App) : CoroutineScope {
|
|||||||
fun setLegendText(legend: IconicsTextView, event: EventFull, showNotes: Boolean = true) {
|
fun setLegendText(legend: IconicsTextView, event: EventFull, showNotes: Boolean = true) {
|
||||||
legend.text = listOfNotNull(
|
legend.text = listOfNotNull(
|
||||||
if (event.addedManually) R.string.legend_event_added_manually else null,
|
if (event.addedManually) R.string.legend_event_added_manually else null,
|
||||||
|
if (event.isSharedSent) R.string.legend_event_shared_sent else null,
|
||||||
|
if (event.isSharedReceived) R.string.legend_event_shared_received else null,
|
||||||
if (event.isDone) R.string.legend_event_is_done else null,
|
if (event.isDone) R.string.legend_event_is_done else null,
|
||||||
if (showNotes) NoteManager.getLegendText(event) else null,
|
if (showNotes) NoteManager.getLegendText(event) else null,
|
||||||
).map { legend.context.getString(it) }.join("\n")
|
).map { legend.context.getString(it) }.join("\n")
|
||||||
|
@ -92,6 +92,8 @@ class UpdateManager(val app: App) : CoroutineScope {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fun notify(update: Update) {
|
fun notify(update: Update) {
|
||||||
|
if (!app.config.sync.notifyAboutUpdates)
|
||||||
|
return
|
||||||
val bigText = listOf(
|
val bigText = listOf(
|
||||||
app.getString(R.string.notification_updates_text, update.versionName),
|
app.getString(R.string.notification_updates_text, update.versionName),
|
||||||
update.releaseNotes?.let { BetterHtml.fromHtml(context = null, it) },
|
update.releaseNotes?.let { BetterHtml.fromHtml(context = null, it) },
|
||||||
|
@ -18,6 +18,10 @@
|
|||||||
<variable
|
<variable
|
||||||
name="editingNote"
|
name="editingNote"
|
||||||
type="Note" />
|
type="Note" />
|
||||||
|
|
||||||
|
<variable
|
||||||
|
name="shareByDefault"
|
||||||
|
type="boolean" />
|
||||||
</data>
|
</data>
|
||||||
|
|
||||||
<androidx.core.widget.NestedScrollView
|
<androidx.core.widget.NestedScrollView
|
||||||
@ -89,7 +93,7 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="16dp"
|
android:layout_marginTop="16dp"
|
||||||
android:checked="@{editingNote.sharedBy != null}"
|
android:checked="@{editingNote.sharedBy != null || editingNote == null && shareByDefault}"
|
||||||
android:isVisible="@{ownerType.shareable}"
|
android:isVisible="@{ownerType.shareable}"
|
||||||
android:minHeight="32dp"
|
android:minHeight="32dp"
|
||||||
android:text="@string/dialog_event_manual_share_enabled" />
|
android:text="@string/dialog_event_manual_share_enabled" />
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
{
|
{
|
||||||
"base": {
|
"base": {
|
||||||
|
"configOverrides": {},
|
||||||
"messagesConfig": {
|
"messagesConfig": {
|
||||||
"subjectLength": null,
|
"subjectLength": null,
|
||||||
"bodyLength": null,
|
"bodyLength": null,
|
||||||
@ -82,8 +83,9 @@
|
|||||||
},
|
},
|
||||||
"university": {
|
"university": {
|
||||||
"configOverrides": {
|
"configOverrides": {
|
||||||
"timetableTrimHourRange": true,
|
"shareByDefault": true,
|
||||||
"timetableColorSubjectName": true
|
"timetableColorSubjectName": true,
|
||||||
|
"timetableTrimHourRange": true
|
||||||
},
|
},
|
||||||
"uiConfig": {
|
"uiConfig": {
|
||||||
"lessonHeight": 45
|
"lessonHeight": 45
|
||||||
|
@ -1437,7 +1437,7 @@
|
|||||||
<string name="agenda_config_elearning_mark">Ustaw wydarzenia jako lekcje on-line</string>
|
<string name="agenda_config_elearning_mark">Ustaw wydarzenia jako lekcje on-line</string>
|
||||||
<string name="agenda_config_elearning_type">Wybierz rodzaj wydarzeń</string>
|
<string name="agenda_config_elearning_type">Wybierz rodzaj wydarzeń</string>
|
||||||
<string name="agenda_config_elearning_group">Grupuj lekcje on-line na liście</string>
|
<string name="agenda_config_elearning_group">Grupuj lekcje on-line na liście</string>
|
||||||
<string name="legend_event_added_manually">{cmd-clipboard-edit-outline} wydarzenie dodane ręcznie</string>
|
<string name="legend_event_added_manually">{cmd-calendar-edit} wydarzenie dodane ręcznie</string>
|
||||||
<string name="legend_event_is_done">{cmd-check} oznaczono jako wykonane</string>
|
<string name="legend_event_is_done">{cmd-check} oznaczono jako wykonane</string>
|
||||||
<string name="agenda_config_not_available_yet">Funkcja jeszcze nie jest dostępna.</string>
|
<string name="agenda_config_not_available_yet">Funkcja jeszcze nie jest dostępna.</string>
|
||||||
<string name="messages_config_compose">Tworzenie wiadomości</string>
|
<string name="messages_config_compose">Tworzenie wiadomości</string>
|
||||||
@ -1549,4 +1549,8 @@
|
|||||||
<string name="notification_user_action_required_oauth_usos">USOS - wymagane logowanie z użyciem przeglądarki</string>
|
<string name="notification_user_action_required_oauth_usos">USOS - wymagane logowanie z użyciem przeglądarki</string>
|
||||||
<string name="oauth_dialog_title">Zaloguj się</string>
|
<string name="oauth_dialog_title">Zaloguj się</string>
|
||||||
<string name="app_cannot_load_data">Nie można załadować danych aplikacji</string>
|
<string name="app_cannot_load_data">Nie można załadować danych aplikacji</string>
|
||||||
|
<string name="legend_event_shared_received">{cmd-share-variant} udostępnione w klasie</string>
|
||||||
|
<string name="legend_event_shared_sent">{cmd-share-variant} udostępnione przez Ciebie</string>
|
||||||
|
<string name="settings_register_share_by_default_text">Domyślnie udostępniaj wydarzenia</string>
|
||||||
|
<string name="settings_register_share_by_default_subtext">Ustaw tworzone wydarzenia domyślnie jako udostępnione</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -5,8 +5,8 @@ buildscript {
|
|||||||
kotlin_version = '1.6.10'
|
kotlin_version = '1.6.10'
|
||||||
|
|
||||||
release = [
|
release = [
|
||||||
versionName: "4.13-rc.2",
|
versionName: "4.13-rc.4",
|
||||||
versionCode: 4130020
|
versionCode: 4130040
|
||||||
]
|
]
|
||||||
|
|
||||||
setup = [
|
setup = [
|
||||||
|
Reference in New Issue
Block a user