浏览代码

little refactoring

Ethosa 3 年之前
父节点
当前提交
f45b5adefb

+ 1 - 0
app/src/main/AndroidManifest.xml

@@ -38,6 +38,7 @@
             android:theme="@style/Theme.KTC.NoActionBar" />
         <activity
             android:name=".ui.activities.MainActivity"
+            android:configChanges="orientation|screenSize|screenLayout|keyboardHidden"
             android:exported="true">
             <intent-filter>
                 <action android:name="android.intent.action.MAIN" />

+ 3 - 2
app/src/main/java/com/ethosa/ktc/ui/dialog/AppUpdater.kt

@@ -52,8 +52,9 @@ class AppUpdater(
                     context.theme)
             )
             .setTitle(R.string.update_dialog_title)
-            .setMessage("""Текущая версия: $version, актуальная версия: ${actualVersion!!}.
-                           ${actualVersion!!.description}""".trimMargin())
+            .setMessage(
+                "Текущая версия: $version, актуальная версия: ${actualVersion!!}." +
+                        "\n\nЧто нового:\n${actualVersion!!.description}")
             .setPositiveButton(R.string.update_dialog_positive) { dialog, _ ->
                 try {
                     // Detect Google play market

+ 1 - 2
app/src/main/java/com/ethosa/ktc/ui/fragments/TimetableFragment.kt

@@ -118,8 +118,7 @@ class TimetableFragment : IOFragmentBackPressed() {
     /**
      * Fetches branches and shows it.
      */
-    @Suppress("MemberVisibilityCanBePrivate")
-    fun fetchBranches() {
+    private fun fetchBranches() {
         Preferences.timetableState = 0
         college.fetchBranches(object : CollegeCallback {
             override fun onResponse(call: Call, response: Response) {