Added russian translation. Minor visual fixes.

This commit is contained in:
Arty Bishop committed 2020-01-22 10:06:15 +00:00
1 parent 2fae9bfb34
commit aea01f303a
9 files changed
+216 -49

No files matched your search

@@ -23,6 +23,7 @@ import android.app.Application
import android.content.Context
import android.content.SharedPreferences
import android.location.Location
import android.util.Log
import androidx.core.content.edit
import androidx.lifecycle.AndroidViewModel
import androidx.lifecycle.LiveData
@@ -48,6 +49,8 @@ import javax.inject.Inject
class MainViewModel(application: Application) : AndroidViewModel(application) {
private val tag = "MainViewModel"
private val app = application
private val keyHours = application.getString(R.string.pref_hours_ahead_key)
private val keyMinEl = application.getString(R.string.pref_min_el_key)
@@ -217,10 +220,10 @@ class MainViewModel(application: Application) : AndroidViewModel(application) {
val tleList = ObjectInputStream(tleStream).readObject()
tleList as List<TLE>
} catch (exception: FileNotFoundException) {
_debugMessage.postValue(app.getString(R.string.err_no_tle_file))
Log.w(tag, app.getString(R.string.err_no_tle_file))
emptyList()
} catch (exception: IOException) {
_debugMessage.postValue(exception.toString())
Log.w(tag, exception.toString())
emptyList()
}
tleSelection = try {
@@ -228,10 +231,10 @@ class MainViewModel(application: Application) : AndroidViewModel(application) {
val selectionList = ObjectInputStream(selectionStream).readObject()
selectionList as MutableList<Int>
} catch (exception: FileNotFoundException) {
_debugMessage.postValue(app.getString(R.string.err_no_selection_file))
Log.w(tag, app.getString(R.string.err_no_selection_file))
mutableListOf()
} catch (exception: IOException) {
_debugMessage.postValue(exception.toString())
Log.w(tag, exception.toString())
mutableListOf()
}
setGroundStationPosition()