Merge pull request #113 from loki-project/version

Added version string at the bottom of settings.
This commit is contained in:
gmbnt 2020-03-05 14:24:36 +11:00 committed by GitHub
commit 1702eeefb5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 20 additions and 2 deletions

View File

@ -257,9 +257,24 @@
<View
android:layout_width="match_parent"
android:layout_height="1px"
android:layout_marginBottom="@dimen/large_spacing"
android:layout_marginBottom="@dimen/medium_spacing"
android:background="@color/separator" />
<TextView
android:id="@+id/versionTextView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:text="@string/version_s"
android:textColor="@color/text"
android:alpha="0.6"
android:textSize="@dimen/very_small_font_size" />
<View
android:layout_width="match_parent"
android:layout_height="1px"
android:layout_marginBottom="@dimen/medium_spacing" />
</LinearLayout>
</ScrollView>

View File

@ -1,13 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">Session</string>
<string name="install_url" translatable="false">https://signal.org/install</string>
<string name="install_url" translatable="false">https://getsession.org/</string>
<string name="yes">Yes</string>
<string name="no">No</string>
<string name="delete">Delete</string>
<string name="please_wait">Please wait...</string>
<string name="save">Save</string>
<string name="note_to_self">Note to Self</string>
<string name="version_s">Version: %s</string>
<!-- AbstractNotificationBuilder -->
<string name="AbstractNotificationBuilder_new_message">New message</string>

View File

@ -17,6 +17,7 @@ import android.view.inputmethod.InputMethodManager
import android.widget.LinearLayout
import android.widget.Toast
import kotlinx.android.synthetic.main.activity_settings.*
import network.loki.messenger.BuildConfig
import network.loki.messenger.R
import nl.komponents.kovenant.Promise
import nl.komponents.kovenant.all
@ -94,6 +95,7 @@ class SettingsActivity : PassphraseRequiredActionBarActivity() {
linkedDevicesButton.setOnClickListener { showLinkedDevices() }
seedButton.setOnClickListener { showSeed() }
clearAllDataButton.setOnClickListener { clearAllData() }
versionTextView.text = String.format(getString(R.string.version_s), BuildConfig.VERSION_NAME)
}
public override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {