Merge branch 'release/0.21.0' into master
@ -14,7 +14,7 @@ cache:
|
||||
branches:
|
||||
only:
|
||||
- develop
|
||||
- 0.20.5
|
||||
- 0.21.0
|
||||
|
||||
android:
|
||||
licenses:
|
||||
@ -48,8 +48,8 @@ before_script:
|
||||
script:
|
||||
- ./gradlew dependencies --stacktrace --daemon
|
||||
- fossa --no-ansi || true
|
||||
- ./gradlew -Pcoverage testPlayDebugUnitTest --stacktrace --daemon
|
||||
- ./gradlew -Pcoverage createFdroidDebugCoverageReport --stacktrace --daemon
|
||||
- ./gradlew -Pcoverage testFdroidDebugUnitTest --stacktrace --daemon
|
||||
- ./gradlew -Pcoverage connectedFdroidDebugAndroidTest --stacktrace --daemon
|
||||
- ./gradlew -Pcoverage jacocoTestReport --stacktrace --daemon
|
||||
- |
|
||||
if [ $TRAVIS_TAG ]; then
|
||||
|
@ -18,8 +18,8 @@ android {
|
||||
testApplicationId "io.github.tests.wulkanowy"
|
||||
minSdkVersion 17
|
||||
targetSdkVersion 29
|
||||
versionCode 69
|
||||
versionName "0.20.5"
|
||||
versionCode 70
|
||||
versionName "0.21.0"
|
||||
multiDexEnabled true
|
||||
resValue "string", "app_name", "Wulkanowy"
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
@ -119,6 +119,7 @@ ext {
|
||||
room = "2.2.5"
|
||||
chucker = "3.2.0"
|
||||
mockk = "1.10.0"
|
||||
moshi = "1.9.3"
|
||||
}
|
||||
|
||||
configurations.all {
|
||||
@ -126,7 +127,7 @@ configurations.all {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation "io.github.wulkanowy:sdk:0.20.5"
|
||||
implementation "io.github.wulkanowy:sdk:0.21.0"
|
||||
|
||||
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.0.10'
|
||||
|
||||
@ -170,7 +171,9 @@ dependencies {
|
||||
implementation "com.ncapdevi:frag-nav:3.3.0"
|
||||
implementation "com.github.YarikSOffice:lingver:1.2.2"
|
||||
|
||||
implementation "com.google.code.gson:gson:2.8.6"
|
||||
implementation "com.squareup.moshi:moshi:$moshi"
|
||||
implementation "com.squareup.moshi:moshi-adapters:$moshi"
|
||||
kapt "com.squareup.moshi:moshi-kotlin-codegen:$moshi"
|
||||
implementation "com.jakewharton.timber:timber:4.7.1"
|
||||
implementation "at.favre.lib:slf4j-timber:1.0.1"
|
||||
implementation "fr.bipi.treessence:treessence:0.3.2"
|
||||
|
@ -35,13 +35,13 @@ task jacocoTestReport(type: JacocoReport) {
|
||||
dir: "$buildDir/intermediates/classes/debug",
|
||||
excludes: excludes
|
||||
) + fileTree(
|
||||
dir: "$buildDir/tmp/kotlin-classes/playDebug",
|
||||
dir: "$buildDir/tmp/kotlin-classes/fdroidDebug",
|
||||
excludes: excludes
|
||||
))
|
||||
|
||||
sourceDirectories.setFrom(files([
|
||||
"src/main/java",
|
||||
"src/play/java"
|
||||
"src/fdroid/java"
|
||||
]))
|
||||
executionData.setFrom(fileTree(
|
||||
dir: project.projectDir,
|
||||
|
@ -1,8 +1,8 @@
|
||||
package io.github.wulkanowy.data.db
|
||||
|
||||
import androidx.room.TypeConverter
|
||||
import com.google.gson.Gson
|
||||
import com.google.gson.reflect.TypeToken
|
||||
import com.squareup.moshi.Moshi
|
||||
import com.squareup.moshi.Types
|
||||
import java.time.Instant
|
||||
import java.time.LocalDate
|
||||
import java.time.LocalDateTime
|
||||
@ -12,6 +12,16 @@ import java.util.Date
|
||||
|
||||
class Converters {
|
||||
|
||||
private val moshi by lazy { Moshi.Builder().build() }
|
||||
|
||||
private val integerListAdapter by lazy {
|
||||
moshi.adapter<List<Int>>(Types.newParameterizedType(List::class.java, Integer::class.java))
|
||||
}
|
||||
|
||||
private val stringMapAdapter by lazy {
|
||||
moshi.adapter<Map<String, String>>(Types.newParameterizedType(MutableMap::class.java, String::class.java, String::class.java))
|
||||
}
|
||||
|
||||
@TypeConverter
|
||||
fun timestampToDate(value: Long?): LocalDate? = value?.run {
|
||||
Date(value).toInstant().atZone(ZoneOffset.UTC).toLocalDate()
|
||||
@ -39,22 +49,22 @@ class Converters {
|
||||
fun intToMonth(value: Int?) = value?.let { Month.of(it) }
|
||||
|
||||
@TypeConverter
|
||||
fun intListToGson(list: List<Int>): String {
|
||||
return Gson().toJson(list)
|
||||
fun intListToJson(list: List<Int>): String {
|
||||
return integerListAdapter.toJson(list)
|
||||
}
|
||||
|
||||
@TypeConverter
|
||||
fun gsonToIntList(value: String): List<Int> {
|
||||
return Gson().fromJson(value, object : TypeToken<List<Int>>() {}.type)
|
||||
fun jsonToIntList(value: String): List<Int> {
|
||||
return integerListAdapter.fromJson(value).orEmpty()
|
||||
}
|
||||
|
||||
@TypeConverter
|
||||
fun stringPairListToGson(list: List<Pair<String, String>>): String {
|
||||
return Gson().toJson(list)
|
||||
fun stringPairListToJson(list: List<Pair<String, String>>): String {
|
||||
return stringMapAdapter.toJson(list.toMap())
|
||||
}
|
||||
|
||||
@TypeConverter
|
||||
fun gsonToStringPairList(value: String): List<Pair<String, String>> {
|
||||
return Gson().fromJson(value, object : TypeToken<List<Pair<String, String>>>() {}.type)
|
||||
fun jsonToStringPairList(value: String): List<Pair<String, String>> {
|
||||
return stringMapAdapter.fromJson(value).orEmpty().toList()
|
||||
}
|
||||
}
|
||||
|
@ -1,3 +1,9 @@
|
||||
package io.github.wulkanowy.data.pojos
|
||||
|
||||
class Contributor(val displayName: String, val githubUsername: String)
|
||||
import com.squareup.moshi.JsonClass
|
||||
|
||||
@JsonClass(generateAdapter = true)
|
||||
class Contributor(
|
||||
val displayName: String,
|
||||
val githubUsername: String
|
||||
)
|
||||
|
@ -1,7 +1,8 @@
|
||||
package io.github.wulkanowy.data.repositories.appcreator
|
||||
|
||||
import android.content.res.AssetManager
|
||||
import com.google.gson.Gson
|
||||
import com.squareup.moshi.Moshi
|
||||
import com.squareup.moshi.Types
|
||||
import io.github.wulkanowy.data.pojos.Contributor
|
||||
import io.github.wulkanowy.utils.DispatchersProvider
|
||||
import kotlinx.coroutines.withContext
|
||||
@ -15,9 +16,9 @@ class AppCreatorRepository @Inject constructor(
|
||||
) {
|
||||
|
||||
suspend fun getAppCreators() = withContext(dispatchers.backgroundThread) {
|
||||
Gson().fromJson(
|
||||
assets.open("contributors.json").bufferedReader().use { it.readText() },
|
||||
Array<Contributor>::class.java
|
||||
).toList()
|
||||
val moshi = Moshi.Builder().build()
|
||||
val type = Types.newParameterizedType(List::class.java, Contributor::class.java)
|
||||
val adapter = moshi.adapter<List<Contributor>>(type)
|
||||
adapter.fromJson(assets.open("contributors.json").bufferedReader().use { it.readText() })
|
||||
}
|
||||
}
|
||||
|
@ -5,6 +5,7 @@ import android.content.SharedPreferences
|
||||
import dagger.hilt.android.qualifiers.ApplicationContext
|
||||
import io.github.wulkanowy.R
|
||||
import io.github.wulkanowy.ui.modules.grade.GradeAverageMode
|
||||
import io.github.wulkanowy.ui.modules.grade.GradeSortingMode
|
||||
import javax.inject.Inject
|
||||
import javax.inject.Singleton
|
||||
|
||||
@ -74,12 +75,25 @@ class PreferencesRepository @Inject constructor(
|
||||
val fillMessageContent: Boolean
|
||||
get() = getBoolean(R.string.pref_key_fill_message_content, R.bool.pref_default_fill_message_content)
|
||||
|
||||
val showGroupsInPlan: Boolean
|
||||
get() = getBoolean(R.string.pref_key_timetable_show_groups, R.bool.pref_default_timetable_show_groups)
|
||||
|
||||
val showWholeClassPlan: String
|
||||
get() = getString(R.string.pref_key_timetable_show_whole_class, R.string.pref_default_timetable_show_whole_class)
|
||||
|
||||
val gradeSortingMode: GradeSortingMode
|
||||
get() = GradeSortingMode.getByValue(getString(R.string.pref_key_grade_sorting_mode, R.string.pref_default_grade_sorting_mode))
|
||||
|
||||
val showTimetableTimers: Boolean
|
||||
get() = getBoolean(R.string.pref_key_timetable_show_timers, R.bool.pref_default_timetable_show_timers)
|
||||
|
||||
var isHomeworkFullscreen: Boolean
|
||||
get() = getBoolean(R.string.pref_key_homework_fullscreen, R.bool.pref_default_homework_fullscreen)
|
||||
set(value) = sharedPref.edit().putBoolean("homework_fullscreen", value).apply()
|
||||
|
||||
val showSubjectsWithoutGrades: Boolean
|
||||
get() = getBoolean(R.string.pref_key_subjects_without_grades, R.bool.pref_default_subjects_without_grades)
|
||||
|
||||
private fun getString(id: Int, default: Int) = getString(context.getString(id), default)
|
||||
|
||||
private fun getString(id: String, default: Int) = sharedPref.getString(id, context.getString(default)) ?: context.getString(default)
|
||||
|
@ -14,6 +14,9 @@ import io.github.wulkanowy.data.db.entities.Semester
|
||||
import io.github.wulkanowy.data.db.entities.Student
|
||||
import io.github.wulkanowy.data.repositories.note.NoteRepository
|
||||
import io.github.wulkanowy.data.repositories.preferences.PreferencesRepository
|
||||
import io.github.wulkanowy.sdk.scrapper.notes.NoteCategory
|
||||
import io.github.wulkanowy.sdk.scrapper.notes.NoteCategory.NEUTRAL
|
||||
import io.github.wulkanowy.sdk.scrapper.notes.NoteCategory.POSITIVE
|
||||
import io.github.wulkanowy.services.sync.channels.NewNotesChannel
|
||||
import io.github.wulkanowy.ui.modules.main.MainActivity
|
||||
import io.github.wulkanowy.ui.modules.main.MainView
|
||||
@ -41,8 +44,20 @@ class NoteWork @Inject constructor(
|
||||
|
||||
private fun notify(notes: List<Note>) {
|
||||
notificationManager.notify(Random.nextInt(Int.MAX_VALUE), NotificationCompat.Builder(context, NewNotesChannel.CHANNEL_ID)
|
||||
.setContentTitle(context.resources.getQuantityString(R.plurals.note_new_items, notes.size, notes.size))
|
||||
.setContentText(context.resources.getQuantityString(R.plurals.note_notify_new_items, notes.size, notes.size))
|
||||
.setContentTitle(
|
||||
when (NoteCategory.getByValue(notes.first().categoryType)) {
|
||||
POSITIVE -> context.resources.getQuantityString(R.plurals.praise_new_items, notes.size, notes.size)
|
||||
NEUTRAL -> context.resources.getQuantityString(R.plurals.neutral_note_new_items, notes.size, notes.size)
|
||||
else -> context.resources.getQuantityString(R.plurals.note_new_items, notes.size, notes.size)
|
||||
}
|
||||
)
|
||||
.setContentText(
|
||||
when (NoteCategory.getByValue(notes.first().categoryType)) {
|
||||
POSITIVE -> context.resources.getQuantityString(R.plurals.praise_notify_new_items, notes.size, notes.size)
|
||||
NEUTRAL -> context.resources.getQuantityString(R.plurals.neutral_note_notify_new_items, notes.size, notes.size)
|
||||
else -> context.resources.getQuantityString(R.plurals.note_notify_new_items, notes.size, notes.size)
|
||||
}
|
||||
)
|
||||
.setSmallIcon(R.drawable.ic_stat_note)
|
||||
.setAutoCancel(true)
|
||||
.setDefaults(DEFAULT_ALL)
|
||||
@ -52,7 +67,13 @@ class NoteWork @Inject constructor(
|
||||
PendingIntent.getActivity(context, MainView.Section.NOTE.id,
|
||||
MainActivity.getStartIntent(context, MainView.Section.NOTE, true), FLAG_UPDATE_CURRENT))
|
||||
.setStyle(NotificationCompat.InboxStyle().run {
|
||||
setSummaryText(context.resources.getQuantityString(R.plurals.note_number_item, notes.size, notes.size))
|
||||
setSummaryText(
|
||||
when (NoteCategory.getByValue(notes.first().categoryType)) {
|
||||
POSITIVE -> context.resources.getQuantityString(R.plurals.praise_number_item, notes.size, notes.size)
|
||||
NEUTRAL -> context.resources.getQuantityString(R.plurals.neutral_note_number_item, notes.size, notes.size)
|
||||
else -> context.resources.getQuantityString(R.plurals.note_number_item, notes.size, notes.size)
|
||||
}
|
||||
)
|
||||
notes.forEach { addLine("${it.teacher}: ${it.category}") }
|
||||
this
|
||||
})
|
||||
|
@ -0,0 +1,10 @@
|
||||
package io.github.wulkanowy.ui.modules.grade
|
||||
|
||||
enum class GradeSortingMode(val value: String) {
|
||||
ALPHABETIC("alphabetic"),
|
||||
DATE("date");
|
||||
|
||||
companion object {
|
||||
fun getByValue(value: String) = values().firstOrNull { it.value == value } ?: ALPHABETIC
|
||||
}
|
||||
}
|
@ -1,5 +1,6 @@
|
||||
package io.github.wulkanowy.ui.modules.grade.details
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import io.github.wulkanowy.data.Status
|
||||
import io.github.wulkanowy.data.db.entities.Grade
|
||||
import io.github.wulkanowy.data.repositories.grade.GradeRepository
|
||||
@ -10,6 +11,8 @@ import io.github.wulkanowy.ui.base.BasePresenter
|
||||
import io.github.wulkanowy.ui.base.ErrorHandler
|
||||
import io.github.wulkanowy.ui.modules.grade.GradeAverageProvider
|
||||
import io.github.wulkanowy.ui.modules.grade.GradeDetailsWithAverage
|
||||
import io.github.wulkanowy.ui.modules.grade.GradeSortingMode.ALPHABETIC
|
||||
import io.github.wulkanowy.ui.modules.grade.GradeSortingMode.DATE
|
||||
import io.github.wulkanowy.utils.FirebaseAnalyticsHelper
|
||||
import io.github.wulkanowy.utils.afterLoading
|
||||
import io.github.wulkanowy.utils.flowWithResource
|
||||
@ -184,10 +187,20 @@ class GradeDetailsPresenter @Inject constructor(
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressLint("DefaultLocale")
|
||||
private fun createGradeItems(items: List<GradeDetailsWithAverage>): List<GradeDetailsItem> {
|
||||
return items
|
||||
.filter { it.grades.isNotEmpty() }
|
||||
.sortedBy { it.subject }
|
||||
.let { gradesWithAverages ->
|
||||
if (!preferencesRepository.showSubjectsWithoutGrades) {
|
||||
gradesWithAverages.filter { it.grades.isNotEmpty() }
|
||||
} else gradesWithAverages
|
||||
}
|
||||
.let {
|
||||
when (preferencesRepository.gradeSortingMode) {
|
||||
DATE -> it.sortedByDescending { gradeDetailsWithAverage -> gradeDetailsWithAverage.grades.firstOrNull()?.date }
|
||||
ALPHABETIC -> it.sortedBy { gradeDetailsWithAverage -> gradeDetailsWithAverage.subject.toLowerCase() }
|
||||
}
|
||||
}
|
||||
.map { (subject, average, points, _, grades) ->
|
||||
val subItems = grades
|
||||
.sortedByDescending { it.date }
|
||||
|
@ -29,6 +29,8 @@ class HomeworkDetailsAdapter @Inject constructor() :
|
||||
attachments = value?.attachments.orEmpty()
|
||||
}
|
||||
|
||||
var isHomeworkFullscreen = false
|
||||
|
||||
var onAttachmentClickListener: (url: String) -> Unit = {}
|
||||
|
||||
var onFullScreenClickListener = {}
|
||||
@ -67,6 +69,8 @@ class HomeworkDetailsAdapter @Inject constructor() :
|
||||
homeworkDialogSubject.text = homework?.subject
|
||||
homeworkDialogTeacher.text = homework?.teacher
|
||||
homeworkDialogContent.text = homework?.content
|
||||
homeworkDialogFullScreen.visibility = if (isHomeworkFullscreen) GONE else VISIBLE
|
||||
homeworkDialogFullScreenExit.visibility = if (isHomeworkFullscreen) VISIBLE else GONE
|
||||
homeworkDialogFullScreen.setOnClickListener {
|
||||
homeworkDialogFullScreen.visibility = GONE
|
||||
homeworkDialogFullScreenExit.visibility = VISIBLE
|
||||
|
@ -62,12 +62,25 @@ class HomeworkDetailsDialog : BaseDialogFragment<DialogHomeworkBinding>(), Homew
|
||||
homeworkDialogClose.setOnClickListener { dismiss() }
|
||||
}
|
||||
|
||||
if (presenter.isHomeworkFullscreen) {
|
||||
dialog?.window?.setLayout(MATCH_PARENT, MATCH_PARENT)
|
||||
} else {
|
||||
dialog?.window?.setLayout(WRAP_CONTENT, WRAP_CONTENT)
|
||||
}
|
||||
|
||||
with(binding.homeworkDialogRecycler) {
|
||||
layoutManager = LinearLayoutManager(context)
|
||||
adapter = detailsAdapter.apply {
|
||||
onAttachmentClickListener = { context.openInternetBrowser(it, ::showMessage) }
|
||||
onFullScreenClickListener = { dialog?.window?.setLayout(MATCH_PARENT, MATCH_PARENT) }
|
||||
onFullScreenExitClickListener = { dialog?.window?.setLayout(WRAP_CONTENT, WRAP_CONTENT) }
|
||||
onFullScreenClickListener = {
|
||||
dialog?.window?.setLayout(MATCH_PARENT, MATCH_PARENT)
|
||||
presenter.isHomeworkFullscreen = true
|
||||
}
|
||||
onFullScreenExitClickListener = {
|
||||
dialog?.window?.setLayout(WRAP_CONTENT, WRAP_CONTENT)
|
||||
presenter.isHomeworkFullscreen = false
|
||||
}
|
||||
isHomeworkFullscreen = presenter.isHomeworkFullscreen
|
||||
homework = this@HomeworkDetailsDialog.homework
|
||||
}
|
||||
}
|
||||
|
@ -3,6 +3,7 @@ package io.github.wulkanowy.ui.modules.homework.details
|
||||
import io.github.wulkanowy.data.Status
|
||||
import io.github.wulkanowy.data.db.entities.Homework
|
||||
import io.github.wulkanowy.data.repositories.homework.HomeworkRepository
|
||||
import io.github.wulkanowy.data.repositories.preferences.PreferencesRepository
|
||||
import io.github.wulkanowy.data.repositories.student.StudentRepository
|
||||
import io.github.wulkanowy.ui.base.BasePresenter
|
||||
import io.github.wulkanowy.ui.base.ErrorHandler
|
||||
@ -16,9 +17,16 @@ class HomeworkDetailsPresenter @Inject constructor(
|
||||
errorHandler: ErrorHandler,
|
||||
studentRepository: StudentRepository,
|
||||
private val homeworkRepository: HomeworkRepository,
|
||||
private val analytics: FirebaseAnalyticsHelper
|
||||
private val analytics: FirebaseAnalyticsHelper,
|
||||
private val preferencesRepository: PreferencesRepository
|
||||
) : BasePresenter<HomeworkDetailsView>(errorHandler, studentRepository) {
|
||||
|
||||
var isHomeworkFullscreen
|
||||
get() = preferencesRepository.isHomeworkFullscreen
|
||||
set(value) {
|
||||
preferencesRepository.isHomeworkFullscreen = value
|
||||
}
|
||||
|
||||
override fun onAttachView(view: HomeworkDetailsView) {
|
||||
super.onAttachView(view)
|
||||
view.initView()
|
||||
|
@ -1,14 +1,21 @@
|
||||
package io.github.wulkanowy.ui.modules.main
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.content.Intent.FLAG_ACTIVITY_CLEAR_TASK
|
||||
import android.content.Intent.FLAG_ACTIVITY_NEW_TASK
|
||||
import android.content.pm.ShortcutInfo
|
||||
import android.content.pm.ShortcutManager
|
||||
import android.graphics.drawable.Icon
|
||||
import android.os.Build
|
||||
import android.os.Build.VERSION.SDK_INT
|
||||
import android.os.Build.VERSION_CODES.LOLLIPOP
|
||||
import android.os.Bundle
|
||||
import android.view.Menu
|
||||
import android.view.MenuItem
|
||||
import androidx.annotation.RequiresApi
|
||||
import androidx.core.content.getSystemService
|
||||
import androidx.core.view.ViewCompat
|
||||
import androidx.fragment.app.DialogFragment
|
||||
import androidx.fragment.app.Fragment
|
||||
@ -31,6 +38,7 @@ import io.github.wulkanowy.ui.modules.message.MessageFragment
|
||||
import io.github.wulkanowy.ui.modules.more.MoreFragment
|
||||
import io.github.wulkanowy.ui.modules.note.NoteFragment
|
||||
import io.github.wulkanowy.ui.modules.timetable.TimetableFragment
|
||||
import io.github.wulkanowy.utils.AppInfo
|
||||
import io.github.wulkanowy.utils.FirebaseAnalyticsHelper
|
||||
import io.github.wulkanowy.utils.dpToPx
|
||||
import io.github.wulkanowy.utils.getThemeAttrColor
|
||||
@ -48,6 +56,9 @@ class MainActivity : BaseActivity<MainPresenter, ActivityMainBinding>(), MainVie
|
||||
@Inject
|
||||
lateinit var analytics: FirebaseAnalyticsHelper
|
||||
|
||||
@Inject
|
||||
lateinit var appInfo: AppInfo
|
||||
|
||||
private val overlayProvider by lazy { ElevationOverlayProvider(this) }
|
||||
|
||||
private val navController = FragNavController(supportFragmentManager, R.id.mainFragmentContainer)
|
||||
@ -59,7 +70,7 @@ class MainActivity : BaseActivity<MainPresenter, ActivityMainBinding>(), MainVie
|
||||
return Intent(context, MainActivity::class.java)
|
||||
.apply {
|
||||
if (clear) flags = FLAG_ACTIVITY_NEW_TASK or FLAG_ACTIVITY_CLEAR_TASK
|
||||
startMenu?.let { putExtra(EXTRA_START_MENU, it) }
|
||||
startMenu?.let { putExtra(EXTRA_START_MENU, it.id) }
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -83,18 +94,45 @@ class MainActivity : BaseActivity<MainPresenter, ActivityMainBinding>(), MainVie
|
||||
MainView.Section.LUCKY_NUMBER.id to LuckyNumberFragment.newInstance()
|
||||
)
|
||||
|
||||
@SuppressLint("NewApi")
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
setContentView(ActivityMainBinding.inflate(layoutInflater).apply { binding = this }.root)
|
||||
setSupportActionBar(binding.mainToolbar)
|
||||
messageContainer = binding.mainFragmentContainer
|
||||
|
||||
presenter.onAttachView(this, intent.getSerializableExtra(EXTRA_START_MENU) as? MainView.Section)
|
||||
presenter.onAttachView(this, MainView.Section.values().singleOrNull { it.id == intent.getIntExtra(EXTRA_START_MENU, -1) })
|
||||
|
||||
with(navController) {
|
||||
initialize(startMenuIndex, savedInstanceState)
|
||||
pushFragment(moreMenuFragments[startMenuMoreIndex])
|
||||
}
|
||||
if (appInfo.systemVersion >= Build.VERSION_CODES.N_MR1) initShortcuts()
|
||||
}
|
||||
|
||||
@RequiresApi(Build.VERSION_CODES.N_MR1)
|
||||
fun initShortcuts() {
|
||||
val shortcutsList = mutableListOf<ShortcutInfo>()
|
||||
|
||||
listOf(
|
||||
Triple(getString(R.string.grade_title), R.drawable.ic_shortcut_grade, MainView.Section.GRADE),
|
||||
Triple(getString(R.string.attendance_title), R.drawable.ic_shortcut_attendance, MainView.Section.ATTENDANCE),
|
||||
Triple(getString(R.string.exam_title), R.drawable.ic_shortcut_exam, MainView.Section.EXAM),
|
||||
Triple(getString(R.string.timetable_title), R.drawable.ic_shortcut_timetable, MainView.Section.TIMETABLE),
|
||||
Triple(getString(R.string.message_title), R.drawable.ic_shortcut_message, MainView.Section.MESSAGE)
|
||||
).forEach { (title, icon, enum) ->
|
||||
shortcutsList.add(ShortcutInfo.Builder(applicationContext, title)
|
||||
.setShortLabel(title)
|
||||
.setLongLabel(title)
|
||||
.setIcon(Icon.createWithResource(applicationContext, icon))
|
||||
.setIntents(arrayOf(
|
||||
Intent(applicationContext, MainActivity::class.java).setAction(Intent.ACTION_VIEW),
|
||||
Intent(applicationContext, MainActivity::class.java).putExtra(EXTRA_START_MENU, enum.id)
|
||||
.setAction(Intent.ACTION_VIEW).addFlags(FLAG_ACTIVITY_NEW_TASK or FLAG_ACTIVITY_CLEAR_TASK)))
|
||||
.build())
|
||||
}
|
||||
|
||||
getSystemService<ShortcutManager>()?.dynamicShortcuts = shortcutsList
|
||||
}
|
||||
|
||||
override fun onCreateOptionsMenu(menu: Menu?): Boolean {
|
||||
|
@ -41,6 +41,8 @@ class TimetableAdapter @Inject constructor() : RecyclerView.Adapter<RecyclerView
|
||||
|
||||
var showWholeClassPlan: String = "no"
|
||||
|
||||
var showGroupsInPlan: Boolean = false
|
||||
|
||||
var showTimers: Boolean = false
|
||||
|
||||
private val timers = mutableMapOf<Int, Timer>()
|
||||
@ -99,6 +101,7 @@ class TimetableAdapter @Inject constructor() : RecyclerView.Adapter<RecyclerView
|
||||
with(binding) {
|
||||
timetableItemNumber.text = lesson.number.toString()
|
||||
timetableItemSubject.text = lesson.subject
|
||||
timetableItemGroup.text = lesson.group
|
||||
timetableItemRoom.text = lesson.room
|
||||
timetableItemTeacher.text = lesson.teacher
|
||||
timetableItemTimeStart.text = lesson.start.toFormattedString("HH:mm")
|
||||
@ -218,6 +221,7 @@ class TimetableAdapter @Inject constructor() : RecyclerView.Adapter<RecyclerView
|
||||
timetableItemDescription.text = lesson.info
|
||||
|
||||
timetableItemRoom.visibility = GONE
|
||||
timetableItemGroup.visibility = GONE
|
||||
timetableItemTeacher.visibility = GONE
|
||||
|
||||
timetableItemDescription.setTextColor(root.context.getThemeAttrColor(
|
||||
@ -227,6 +231,7 @@ class TimetableAdapter @Inject constructor() : RecyclerView.Adapter<RecyclerView
|
||||
} else {
|
||||
timetableItemDescription.visibility = GONE
|
||||
timetableItemRoom.visibility = VISIBLE
|
||||
timetableItemGroup.visibility = if (showGroupsInPlan && lesson.group.isNotBlank()) VISIBLE else GONE
|
||||
timetableItemTeacher.visibility = VISIBLE
|
||||
}
|
||||
}
|
||||
|
@ -88,11 +88,12 @@ class TimetableFragment : BaseFragment<FragmentTimetableBinding>(R.layout.fragme
|
||||
else false
|
||||
}
|
||||
|
||||
override fun updateData(data: List<Timetable>, showWholeClassPlanType: String, showTimetableTimers: Boolean) {
|
||||
override fun updateData(data: List<Timetable>, showWholeClassPlanType: String, showGroupsInPlanType: Boolean, showTimetableTimers: Boolean) {
|
||||
with(timetableAdapter) {
|
||||
items = data.toMutableList()
|
||||
showTimers = showTimetableTimers
|
||||
showWholeClassPlan = showWholeClassPlanType
|
||||
showGroupsInPlan = showGroupsInPlanType
|
||||
notifyDataSetChanged()
|
||||
}
|
||||
}
|
||||
|
@ -143,6 +143,7 @@ class TimetablePresenter @Inject constructor(
|
||||
view?.apply {
|
||||
updateData(
|
||||
showWholeClassPlanType = prefRepository.showWholeClassPlan,
|
||||
showGroupsInPlanType = prefRepository.showGroupsInPlan,
|
||||
showTimetableTimers = prefRepository.showTimetableTimers,
|
||||
data = it.data!!
|
||||
.filter { item -> if (prefRepository.showWholeClassPlan == "no") item.isStudentPlan else true }
|
||||
|
@ -12,7 +12,7 @@ interface TimetableView : BaseView {
|
||||
|
||||
fun initView()
|
||||
|
||||
fun updateData(data: List<Timetable>, showWholeClassPlanType: String, showTimetableTimers: Boolean)
|
||||
fun updateData(data: List<Timetable>, showWholeClassPlanType: String, showGroupsInPlanType: Boolean, showTimetableTimers: Boolean)
|
||||
|
||||
fun updateNavigationDay(date: String)
|
||||
|
||||
|
@ -1,5 +1,10 @@
|
||||
Wersja 0.20.5
|
||||
- naprawiliśmy logowanie do koszalińskiego dziennika
|
||||
- naprawiliśmy resetowanie hasła na gdańskim dzienniku
|
||||
Wersja 0.21.0
|
||||
- naprawiliśmy logowanie do tarnowskiego dziennika
|
||||
- naprawiliśmy wyświetlanie podsumowania punktów klasy
|
||||
- dodaliśmy skróty aplikacji
|
||||
- dodaliśmy opcję pokazywania nazwy grupy w planie lekcji na liście
|
||||
- dodaliśmy opcję pokazywania w ocenach przedmiotów bez ocen
|
||||
- dodaliśmy dodatkowe opcje sortowania ocen
|
||||
- dodaliśmy rozróżnianie powiadomień dla pochwał i uwag
|
||||
|
||||
Pełna lista zmian: https://github.com/wulkanowy/wulkanowy/releases
|
||||
|
BIN
app/src/main/res/drawable-hdpi/ic_shortcut_attendance.png
Normal file
After Width: | Height: | Size: 1.5 KiB |
BIN
app/src/main/res/drawable-hdpi/ic_shortcut_exam.png
Normal file
After Width: | Height: | Size: 1.6 KiB |
BIN
app/src/main/res/drawable-hdpi/ic_shortcut_grade.png
Normal file
After Width: | Height: | Size: 1.8 KiB |
BIN
app/src/main/res/drawable-hdpi/ic_shortcut_message.png
Normal file
After Width: | Height: | Size: 1.7 KiB |
BIN
app/src/main/res/drawable-hdpi/ic_shortcut_timetable.png
Normal file
After Width: | Height: | Size: 1.6 KiB |
BIN
app/src/main/res/drawable-mdpi/ic_shortcut_attendance.png
Normal file
After Width: | Height: | Size: 902 B |
BIN
app/src/main/res/drawable-mdpi/ic_shortcut_exam.png
Normal file
After Width: | Height: | Size: 913 B |
BIN
app/src/main/res/drawable-mdpi/ic_shortcut_grade.png
Normal file
After Width: | Height: | Size: 1.0 KiB |
BIN
app/src/main/res/drawable-mdpi/ic_shortcut_message.png
Normal file
After Width: | Height: | Size: 1.0 KiB |
BIN
app/src/main/res/drawable-mdpi/ic_shortcut_timetable.png
Normal file
After Width: | Height: | Size: 937 B |
BIN
app/src/main/res/drawable-xhdpi/ic_shortcut_attendance.png
Normal file
After Width: | Height: | Size: 1.9 KiB |
BIN
app/src/main/res/drawable-xhdpi/ic_shortcut_exam.png
Normal file
After Width: | Height: | Size: 1.9 KiB |
BIN
app/src/main/res/drawable-xhdpi/ic_shortcut_grade.png
Normal file
After Width: | Height: | Size: 2.2 KiB |
BIN
app/src/main/res/drawable-xhdpi/ic_shortcut_message.png
Normal file
After Width: | Height: | Size: 2.3 KiB |
BIN
app/src/main/res/drawable-xhdpi/ic_shortcut_timetable.png
Normal file
After Width: | Height: | Size: 1.9 KiB |
BIN
app/src/main/res/drawable-xxhdpi/ic_shortcut_attendance.png
Normal file
After Width: | Height: | Size: 3.3 KiB |
BIN
app/src/main/res/drawable-xxhdpi/ic_shortcut_exam.png
Normal file
After Width: | Height: | Size: 3.3 KiB |
BIN
app/src/main/res/drawable-xxhdpi/ic_shortcut_grade.png
Normal file
After Width: | Height: | Size: 3.8 KiB |
BIN
app/src/main/res/drawable-xxhdpi/ic_shortcut_message.png
Normal file
After Width: | Height: | Size: 4.2 KiB |
BIN
app/src/main/res/drawable-xxhdpi/ic_shortcut_timetable.png
Normal file
After Width: | Height: | Size: 3.4 KiB |
BIN
app/src/main/res/drawable-xxxhdpi/ic_shortcut_attendance.png
Normal file
After Width: | Height: | Size: 4.8 KiB |
BIN
app/src/main/res/drawable-xxxhdpi/ic_shortcut_exam.png
Normal file
After Width: | Height: | Size: 4.9 KiB |
BIN
app/src/main/res/drawable-xxxhdpi/ic_shortcut_grade.png
Normal file
After Width: | Height: | Size: 5.4 KiB |
BIN
app/src/main/res/drawable-xxxhdpi/ic_shortcut_message.png
Normal file
After Width: | Height: | Size: 5.9 KiB |
BIN
app/src/main/res/drawable-xxxhdpi/ic_shortcut_timetable.png
Normal file
After Width: | Height: | Size: 5.0 KiB |
@ -1,5 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
@ -20,17 +21,18 @@
|
||||
android:id="@+id/creatorRecycler"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1" />
|
||||
android:layout_weight="1"
|
||||
tools:listitem="@layout/item_contributor" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/creatorSeeMore"
|
||||
style="@style/Widget.MaterialComponents.Button.OutlinedButton"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/Widget.MaterialComponents.Button.OutlinedButton"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:layout_marginLeft="32dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginRight="32dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:text="@string/contributor_see_more" />
|
||||
</LinearLayout>
|
||||
</FrameLayout>
|
||||
|
@ -15,7 +15,8 @@
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:contentDescription="@string/contributor_avatar_description" />
|
||||
android:contentDescription="@string/contributor_avatar_description"
|
||||
tools:src="@tools:sample/avatars" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/creatorItemName"
|
||||
|
@ -74,7 +74,22 @@
|
||||
app:layout_constraintBottom_toBottomOf="@+id/timetableItemNumber"
|
||||
app:layout_constraintStart_toEndOf="@+id/timetableItemTimeStart"
|
||||
tools:text="22"
|
||||
tools:visibility="gone" />
|
||||
tools:visibility="visible" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/timetableItemGroup"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginTop="0dp"
|
||||
android:layout_marginEnd="5dp"
|
||||
android:textColor="?android:textColorSecondary"
|
||||
android:textSize="13sp"
|
||||
app:layout_constraintEnd_toStartOf="@+id/timetableItemTeacher"
|
||||
app:layout_constraintStart_toEndOf="@+id/timetableItemRoom"
|
||||
app:layout_constraintTop_toTopOf="@+id/timetableItemTimeFinish"
|
||||
tools:text="(2/2)"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/timetableItemTeacher"
|
||||
@ -87,9 +102,9 @@
|
||||
android:textColor="?android:textColorSecondary"
|
||||
android:textSize="13sp"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/timetableItemNumber"
|
||||
app:layout_constraintStart_toEndOf="@id/timetableItemRoom"
|
||||
app:layout_constraintStart_toEndOf="@id/timetableItemGroup"
|
||||
tools:text="Agata Kowalska - Błaszczyk"
|
||||
tools:visibility="gone" />
|
||||
tools:visibility="visible" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/timetableItemDescription"
|
||||
@ -101,7 +116,7 @@
|
||||
android:textColor="?colorTimetableChange"
|
||||
android:textSize="13sp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/timetableItemTimeStart"
|
||||
app:layout_constraintStart_toEndOf="@+id/timetableItemTeacher"
|
||||
app:layout_constraintTop_toTopOf="@+id/timetableItemTimeFinish"
|
||||
tools:text="Lekcja odwołana: uczniowie zwolnieni do domu"
|
||||
tools:visibility="visible" />
|
||||
|
@ -19,7 +19,7 @@
|
||||
<string name="homework_title">Hausaufgaben</string>
|
||||
<string name="account_title">Wählen Sie ein Konto</string>
|
||||
<!--Subtitles-->
|
||||
<string name="grade_subtitle">Semester %d, %d/%d</string>
|
||||
<string name="grade_subtitle">Semester %1$d, %2$d/%3$d</string>
|
||||
<!--Login-->
|
||||
<string name="login_header_default">Melden Sie sich mit dem Studenten- oder Elternkonto an</string>
|
||||
<string name="login_header_symbol">Geben Sie das Symbol</string>
|
||||
|
@ -29,6 +29,10 @@
|
||||
<item>0,5</item>
|
||||
<item>0,75</item>
|
||||
</string-array>
|
||||
<string-array name="grade_sorting_mode_entries">
|
||||
<item>Alfabetycznie</item>
|
||||
<item>Według daty</item>
|
||||
</string-array>
|
||||
<string-array name="grade_color_scheme_entries">
|
||||
<item>Dzienniczek+</item>
|
||||
<item>Wulkanowy</item>
|
||||
|
@ -19,7 +19,7 @@
|
||||
<string name="homework_title">Zadania domowe</string>
|
||||
<string name="account_title">Wybierz konto</string>
|
||||
<!--Subtitles-->
|
||||
<string name="grade_subtitle">Semestr %d, %d/%d</string>
|
||||
<string name="grade_subtitle">Semestr %1$d, %2$d/%3$d</string>
|
||||
<!--Login-->
|
||||
<string name="login_header_default">Zaloguj się za pomocą konta ucznia lub rodzica</string>
|
||||
<string name="login_header_symbol">Podaj symbol</string>
|
||||
@ -252,6 +252,44 @@
|
||||
<item quantity="many">Masz %1$d nowych uwag</item>
|
||||
<item quantity="other">Masz %1$d nowych uwag</item>
|
||||
</plurals>
|
||||
<!--Praise-->
|
||||
<plurals name="praise_number_item">
|
||||
<item quantity="one">%d pochwała</item>
|
||||
<item quantity="few">%d pochwały</item>
|
||||
<item quantity="many">%d pochwał</item>
|
||||
<item quantity="other">%d pochwał</item>
|
||||
</plurals>
|
||||
<plurals name="praise_new_items">
|
||||
<item quantity="one">Nowa pochwała</item>
|
||||
<item quantity="few">Nowe pochwały</item>
|
||||
<item quantity="many">Nowe pochwały</item>
|
||||
<item quantity="other">Nowe pochwały</item>
|
||||
</plurals>
|
||||
<plurals name="praise_notify_new_items">
|
||||
<item quantity="one">Masz %1$d nową pochwałę</item>
|
||||
<item quantity="few">Masz %1$d nowe pochwały</item>
|
||||
<item quantity="many">Masz %1$d nowych pochwał</item>
|
||||
<item quantity="other">Masz %1$d nowych pochwał</item>
|
||||
</plurals>
|
||||
<!--Neutral notes-->
|
||||
<plurals name="neutral_note_number_item">
|
||||
<item quantity="one">%d neutralna uwaga</item>
|
||||
<item quantity="few">%d neutralne uwagi</item>
|
||||
<item quantity="many">%d neutralnych uwag</item>
|
||||
<item quantity="other">%d neutralnych uwag</item>
|
||||
</plurals>
|
||||
<plurals name="neutral_note_new_items">
|
||||
<item quantity="one">Nowa neutralna uwaga</item>
|
||||
<item quantity="few">Nowe neutralne uwagi</item>
|
||||
<item quantity="many">Nowe neutralne uwagi</item>
|
||||
<item quantity="other">Nowe neutralne uwagi</item>
|
||||
</plurals>
|
||||
<plurals name="neutral_note_notify_new_items">
|
||||
<item quantity="one">Masz %1$d nową neutralną uwagę</item>
|
||||
<item quantity="few">Masz %1$d nowe neutralne uwagi</item>
|
||||
<item quantity="many">Masz %1$d nowych neutralnych uwag</item>
|
||||
<item quantity="other">Masz %1$d nowych neutralnych uwag</item>
|
||||
</plurals>
|
||||
<!--Homework-->
|
||||
<string name="homework_no_items">Brak zadań domowych</string>
|
||||
<string name="homework_mark_as_done">Wykonane</string>
|
||||
@ -357,9 +395,12 @@
|
||||
<string name="pref_view_app_theme">Motyw aplikacji</string>
|
||||
<string name="pref_view_expand_grade">Rozwiń oceny</string>
|
||||
<string name="pref_view_timetable_show_timers">Oznaczaj bieżącą lekcję na planie</string>
|
||||
<string name="pref_view_timetable_show_groups">Pokazuj grupę obok przedmiotu na planie</string>
|
||||
<string name="pref_view_grade_statistics_list">Pokazuj listę wykresów w ocenach klasy</string>
|
||||
<string name="pref_view_timetable_show_whole_class">Pokazuj lekcje całej klasy</string>
|
||||
<string name="pref_view_subjects_without_grades">Pokazuj przedmioty bez ocen w Oceny</string>
|
||||
<string name="pref_view_grade_color_scheme">Schemat kolorów ocen</string>
|
||||
<string name="pref_view_grade_sorting_mode">Sortowanie przedmiotów w "Oceny"</string>
|
||||
<string name="pref_view_app_language">Język aplikacji</string>
|
||||
<string name="pref_notify_header">Powiadomienia</string>
|
||||
<string name="pref_notify_switch">Pokazuj powiadomienia</string>
|
||||
|
@ -19,7 +19,7 @@
|
||||
<string name="homework_title">Домашние задания</string>
|
||||
<string name="account_title">Выберите аккаунт</string>
|
||||
<!--Subtitles-->
|
||||
<string name="grade_subtitle">%d семестр, %d/%d</string>
|
||||
<string name="grade_subtitle">%1$d семестр, %2$d/%3$d</string>
|
||||
<!--Login-->
|
||||
<string name="login_header_default">Авторизируйтесь при помощи аккаунта ученика или родителя</string>
|
||||
<string name="login_header_symbol">Впишите \"symbol\"</string>
|
||||
|
@ -19,7 +19,7 @@
|
||||
<string name="homework_title">Домашні завдання</string>
|
||||
<string name="account_title">Оберіть аккаунт</string>
|
||||
<!--Subtitles-->
|
||||
<string name="grade_subtitle">%d семестр, %d/%d</string>
|
||||
<string name="grade_subtitle">%1$d семестр, %2$d/%3$d</string>
|
||||
<!--Login-->
|
||||
<string name="login_header_default">Авторизуйтеся за допомогою аккаунта учня або батька</string>
|
||||
<string name="login_header_symbol">Впишіть \"symbol\"</string>
|
||||
|
@ -18,6 +18,10 @@
|
||||
<string name="pref_default_grade_modifier_plus">0.33</string>
|
||||
<string name="pref_default_grade_modifier_minus">0.33</string>
|
||||
<bool name="pref_default_fill_message_content">true</bool>
|
||||
<bool name="pref_default_timetable_show_groups">false</bool>
|
||||
<string name="pref_default_timetable_show_whole_class">no</string>
|
||||
<string name="pref_default_grade_sorting_mode">alphabetic</string>
|
||||
<bool name="pref_default_timetable_show_timers">false</bool>
|
||||
<bool name="pref_default_homework_fullscreen">false</bool>
|
||||
<bool name="pref_default_subjects_without_grades">false</bool>
|
||||
</resources>
|
||||
|
@ -20,6 +20,10 @@
|
||||
<string name="pref_key_grade_modifier_plus">grade_modifier_plus</string>
|
||||
<string name="pref_key_grade_modifier_minus">grade_modifier_minus</string>
|
||||
<string name="pref_key_fill_message_content">fill_message_content</string>
|
||||
<string name="pref_key_grade_sorting_mode">grade_sorting_mode</string>
|
||||
<string name="pref_key_timetable_show_whole_class">show_whole_class_plan</string>
|
||||
<string name="pref_key_timetable_show_groups">show_groups_in_plan</string>
|
||||
<string name="pref_key_timetable_show_timers">timetable_show_timers</string>
|
||||
<string name="pref_key_homework_fullscreen">homework_fullscreen</string>
|
||||
<string name="pref_key_subjects_without_grades">subjects_without_grades</string>
|
||||
</resources>
|
||||
|
@ -75,6 +75,15 @@
|
||||
<item>0.75</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="grade_sorting_mode_entries">
|
||||
<item>Alphabetic</item>
|
||||
<item>By date</item>
|
||||
</string-array>
|
||||
<string-array name="grade_sorting_mode_values" translatable="false">
|
||||
<item>alphabetic</item>
|
||||
<item>date</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="grade_color_scheme_entries">
|
||||
<item>Dzienniczek+</item>
|
||||
<item>Wulkanowy</item>
|
||||
|
@ -21,7 +21,7 @@
|
||||
|
||||
|
||||
<!--Subtitles-->
|
||||
<string name="grade_subtitle">Semester %d, %d/%d</string>
|
||||
<string name="grade_subtitle">Semester %1$d, %2$d/%3$d</string>
|
||||
|
||||
|
||||
<!--Login-->
|
||||
@ -249,6 +249,34 @@
|
||||
<item quantity="other">You received %1$d notes</item>
|
||||
</plurals>
|
||||
|
||||
<!--Praise-->
|
||||
<plurals name="praise_number_item">
|
||||
<item quantity="one">%d praise</item>
|
||||
<item quantity="other">%d praises</item>
|
||||
</plurals>
|
||||
<plurals name="praise_new_items">
|
||||
<item quantity="one">New praise</item>
|
||||
<item quantity="other">New praises</item>
|
||||
</plurals>
|
||||
<plurals name="praise_notify_new_items">
|
||||
<item quantity="one">You received %1$d praise</item>
|
||||
<item quantity="other">You received %1$d praises</item>
|
||||
</plurals>
|
||||
|
||||
<!--Neutral notes-->
|
||||
<plurals name="neutral_note_number_item">
|
||||
<item quantity="one">%d neutral note</item>
|
||||
<item quantity="other">%d neutral notes</item>
|
||||
</plurals>
|
||||
<plurals name="neutral_note_new_items">
|
||||
<item quantity="one">New neutral note</item>
|
||||
<item quantity="other">New neutral notes</item>
|
||||
</plurals>
|
||||
<plurals name="neutral_note_notify_new_items">
|
||||
<item quantity="one">You received %1$d neutral note</item>
|
||||
<item quantity="other">You received %1$d neutral notes</item>
|
||||
</plurals>
|
||||
|
||||
|
||||
<!--Homework-->
|
||||
<string name="homework_no_items">No info about homework</string>
|
||||
@ -383,9 +411,12 @@
|
||||
<string name="pref_view_app_theme">Application theme</string>
|
||||
<string name="pref_view_expand_grade">Expand grades</string>
|
||||
<string name="pref_view_timetable_show_timers">Mark current lesson in timetable</string>
|
||||
<string name="pref_view_timetable_show_groups">Show groups next to subjects in timetable</string>
|
||||
<string name="pref_view_grade_statistics_list">Show chart list in class grades</string>
|
||||
<string name="pref_view_timetable_show_whole_class">Show whole class lessons</string>
|
||||
<string name="pref_view_subjects_without_grades">Show subjects without grades in Grades</string>
|
||||
<string name="pref_view_grade_color_scheme">Grades color scheme</string>
|
||||
<string name="pref_view_grade_sorting_mode">Subjects sorting in "Grades"</string>
|
||||
<string name="pref_view_app_language">App language</string>
|
||||
|
||||
<string name="pref_notify_header">Notifications</string>
|
||||
|
@ -40,6 +40,18 @@
|
||||
app:key="@string/pref_key_grade_statistics_list"
|
||||
app:singleLineTitle="false"
|
||||
app:title="@string/pref_view_grade_statistics_list" />
|
||||
<SwitchPreferenceCompat
|
||||
app:defaultValue="@bool/pref_default_timetable_show_groups"
|
||||
app:iconSpaceReserved="false"
|
||||
app:key="@string/pref_key_timetable_show_groups"
|
||||
app:singleLineTitle="false"
|
||||
app:title="@string/pref_view_timetable_show_groups" />
|
||||
<SwitchPreferenceCompat
|
||||
app:defaultValue="@bool/pref_default_subjects_without_grades"
|
||||
app:iconSpaceReserved="false"
|
||||
app:key="@string/pref_key_subjects_without_grades"
|
||||
app:singleLineTitle="false"
|
||||
app:title="@string/pref_view_subjects_without_grades" />
|
||||
<ListPreference
|
||||
app:defaultValue="@string/pref_default_timetable_show_whole_class"
|
||||
app:entries="@array/timetable_show_whole_class_entries"
|
||||
@ -56,6 +68,14 @@
|
||||
app:key="@string/pref_key_grade_color_scheme"
|
||||
app:title="@string/pref_view_grade_color_scheme"
|
||||
app:useSimpleSummaryProvider="true" />
|
||||
<ListPreference
|
||||
app:defaultValue="@string/pref_default_grade_sorting_mode"
|
||||
app:entries="@array/grade_sorting_mode_entries"
|
||||
app:entryValues="@array/grade_sorting_mode_values"
|
||||
app:iconSpaceReserved="false"
|
||||
app:key="@string/pref_key_grade_sorting_mode"
|
||||
app:title="@string/pref_view_grade_sorting_mode"
|
||||
app:useSimpleSummaryProvider="true" />
|
||||
<ListPreference
|
||||
app:defaultValue="@string/pref_default_app_language"
|
||||
app:entries="@array/app_language_entries"
|
||||
|
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@ -1,5 +1,5 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.3-all.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.6.1-all.zip
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
|
2
gradlew
vendored
@ -82,6 +82,7 @@ esac
|
||||
|
||||
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||
|
||||
|
||||
# Determine the Java command to use to start the JVM.
|
||||
if [ -n "$JAVA_HOME" ] ; then
|
||||
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
||||
@ -129,6 +130,7 @@ fi
|
||||
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
|
||||
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
|
||||
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
|
||||
|
||||
JAVACMD=`cygpath --unix "$JAVACMD"`
|
||||
|
||||
# We build the pattern for arguments to be converted via cygpath
|
||||
|
22
gradlew.bat
vendored
@ -40,7 +40,7 @@ if defined JAVA_HOME goto findJavaFromJavaHome
|
||||
|
||||
set JAVA_EXE=java.exe
|
||||
%JAVA_EXE% -version >NUL 2>&1
|
||||
if "%ERRORLEVEL%" == "0" goto init
|
||||
if "%ERRORLEVEL%" == "0" goto execute
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
@ -54,7 +54,7 @@ goto fail
|
||||
set JAVA_HOME=%JAVA_HOME:"=%
|
||||
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||
|
||||
if exist "%JAVA_EXE%" goto init
|
||||
if exist "%JAVA_EXE%" goto execute
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
||||
@ -64,28 +64,14 @@ echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:init
|
||||
@rem Get command-line arguments, handling Windows variants
|
||||
|
||||
if not "%OS%" == "Windows_NT" goto win9xME_args
|
||||
|
||||
:win9xME_args
|
||||
@rem Slurp the command line arguments.
|
||||
set CMD_LINE_ARGS=
|
||||
set _SKIP=2
|
||||
|
||||
:win9xME_args_slurp
|
||||
if "x%~1" == "x" goto execute
|
||||
|
||||
set CMD_LINE_ARGS=%*
|
||||
|
||||
:execute
|
||||
@rem Setup the command line
|
||||
|
||||
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||
|
||||
|
||||
@rem Execute Gradle
|
||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
|
||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
|
||||
|
||||
:end
|
||||
@rem End local scope for the variables with windows NT shell
|
||||
|