mirror of
https://github.com/recloudstream/cloudstream.git
synced 2024-08-15 01:53:11 +00:00
make version copyable and fix my stupidity
This commit is contained in:
parent
b58d4cc835
commit
2a30643d5e
5 changed files with 16 additions and 7 deletions
|
@ -24,6 +24,8 @@ import com.lagradost.cloudstream3.databinding.MainSettingsBinding
|
||||||
import com.lagradost.cloudstream3.mvvm.logError
|
import com.lagradost.cloudstream3.mvvm.logError
|
||||||
import com.lagradost.cloudstream3.syncproviders.AccountManager.Companion.accountManagers
|
import com.lagradost.cloudstream3.syncproviders.AccountManager.Companion.accountManagers
|
||||||
import com.lagradost.cloudstream3.ui.home.HomeFragment
|
import com.lagradost.cloudstream3.ui.home.HomeFragment
|
||||||
|
import com.lagradost.cloudstream3.ui.result.txt
|
||||||
|
import com.lagradost.cloudstream3.utils.UIHelper.clipboardHelper
|
||||||
import com.lagradost.cloudstream3.utils.UIHelper.fixPaddingStatusbar
|
import com.lagradost.cloudstream3.utils.UIHelper.fixPaddingStatusbar
|
||||||
import com.lagradost.cloudstream3.utils.UIHelper.navigate
|
import com.lagradost.cloudstream3.utils.UIHelper.navigate
|
||||||
import com.lagradost.cloudstream3.utils.UIHelper.setImage
|
import com.lagradost.cloudstream3.utils.UIHelper.setImage
|
||||||
|
@ -230,5 +232,13 @@ class SettingsFragment : Fragment() {
|
||||||
settingsGeneral.requestFocus()
|
settingsGeneral.requestFocus()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
val appVersion = getString(R.string.app_version)
|
||||||
|
val commitInfo = getString(R.string.commit_hash)
|
||||||
|
|
||||||
|
binding?.appVersionInfo?.setOnLongClickListener{
|
||||||
|
clipboardHelper(txt(R.string.extension_version), "$appVersion $commitInfo")
|
||||||
|
true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
package com.lagradost.cloudstream3.ui.settings
|
package com.lagradost.cloudstream3.ui.settings
|
||||||
|
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.os.TransactionTooLargeException
|
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import android.widget.Toast
|
import android.widget.Toast
|
||||||
import androidx.appcompat.app.AlertDialog
|
import androidx.appcompat.app.AlertDialog
|
||||||
|
@ -17,7 +16,6 @@ import com.lagradost.cloudstream3.databinding.LogcatBinding
|
||||||
import com.lagradost.cloudstream3.mvvm.logError
|
import com.lagradost.cloudstream3.mvvm.logError
|
||||||
import com.lagradost.cloudstream3.network.initClient
|
import com.lagradost.cloudstream3.network.initClient
|
||||||
import com.lagradost.cloudstream3.services.BackupWorkManager
|
import com.lagradost.cloudstream3.services.BackupWorkManager
|
||||||
import com.lagradost.cloudstream3.ui.result.UiText
|
|
||||||
import com.lagradost.cloudstream3.ui.result.txt
|
import com.lagradost.cloudstream3.ui.result.txt
|
||||||
import com.lagradost.cloudstream3.ui.settings.SettingsFragment.Companion.getPref
|
import com.lagradost.cloudstream3.ui.settings.SettingsFragment.Companion.getPref
|
||||||
import com.lagradost.cloudstream3.ui.settings.SettingsFragment.Companion.setPaddingBottom
|
import com.lagradost.cloudstream3.ui.settings.SettingsFragment.Companion.setPaddingBottom
|
||||||
|
|
|
@ -137,7 +137,7 @@ object UIHelper {
|
||||||
ctx.getSystemService<ClipboardManager>()?.setPrimaryClip(clip)
|
ctx.getSystemService<ClipboardManager>()?.setPrimaryClip(clip)
|
||||||
|
|
||||||
if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.S_V2) {
|
if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.S_V2) {
|
||||||
showToast("$label $labelSuffix")
|
showToast("${label.asString(ctx)} $labelSuffix")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (t: Throwable) {
|
} catch (t: Throwable) {
|
||||||
|
@ -152,7 +152,7 @@ object UIHelper {
|
||||||
}
|
}
|
||||||
|
|
||||||
else -> {
|
else -> {
|
||||||
showToast(R.string.unexpected_error, LENGTH_LONG)
|
showToast(R.string.clipboard_unknown_error, LENGTH_LONG)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -105,9 +105,10 @@
|
||||||
android:text="@string/extensions" />
|
android:text="@string/extensions" />
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:id="@+id/app_version_info"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:gravity="center_horizontal"
|
android:layout_gravity="center"
|
||||||
android:orientation="horizontal">
|
android:orientation="horizontal">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
|
|
@ -646,7 +646,7 @@
|
||||||
<string name="enable_skip_op_from_database_des">Show skip popups for opening/ending</string>
|
<string name="enable_skip_op_from_database_des">Show skip popups for opening/ending</string>
|
||||||
<string name="clipboard_too_large">Too much text. Unable to save to clipboard.</string>
|
<string name="clipboard_too_large">Too much text. Unable to save to clipboard.</string>
|
||||||
<string name="clipboard_permission_error">Error accessing Clipboard, Please try again.</string>
|
<string name="clipboard_permission_error">Error accessing Clipboard, Please try again.</string>
|
||||||
<string name="clipboard_unknown_error">Error copying content, Please copy logcat and contact app support.</string>
|
<string name="clipboard_unknown_error">Error copying, Please copy logcat and contact app support.</string>
|
||||||
<string name="action_mark_as_watched">Mark as watched</string>
|
<string name="action_mark_as_watched">Mark as watched</string>
|
||||||
<string name="action_remove_from_watched">Remove from watched</string>
|
<string name="action_remove_from_watched">Remove from watched</string>
|
||||||
<string name="confirm_exit_dialog">Are you sure you want to exit\?</string>
|
<string name="confirm_exit_dialog">Are you sure you want to exit\?</string>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue