tiny fixes
This commit is contained in:
parent
07263e19f1
commit
68213c8556
|
@ -104,29 +104,34 @@ class HomeFragment : Fragment(), View.OnClickListener {
|
||||||
when (v?.id) {
|
when (v?.id) {
|
||||||
R.id.vanced_installbtn -> {
|
R.id.vanced_installbtn -> {
|
||||||
if (!isInstallationRunning(requireActivity())) {
|
if (!isInstallationRunning(requireActivity())) {
|
||||||
if (variant == "nonroot" && !viewModel.microgInstalled.get()!!) {
|
if (!viewModel.fetching.get()!!) {
|
||||||
Snackbar.make(binding.homeRefresh, R.string.no_microg, Snackbar.LENGTH_LONG)
|
if (variant == "nonroot" && !viewModel.microgInstalled.get()!!) {
|
||||||
.setAction(R.string.install) {
|
Snackbar.make(
|
||||||
|
binding.homeRefresh,
|
||||||
|
R.string.no_microg,
|
||||||
|
Snackbar.LENGTH_LONG
|
||||||
|
)
|
||||||
|
.setAction(R.string.install) {
|
||||||
|
requireActivity().startService(
|
||||||
|
Intent(
|
||||||
|
requireActivity(),
|
||||||
|
MicrogDownloadService::class.java
|
||||||
|
)
|
||||||
|
)
|
||||||
|
}.show()
|
||||||
|
} else {
|
||||||
|
if (prefs?.getBoolean("valuesModified", false)!!) {
|
||||||
requireActivity().startService(
|
requireActivity().startService(
|
||||||
Intent(
|
Intent(
|
||||||
requireActivity(),
|
requireActivity(),
|
||||||
MicrogDownloadService::class.java
|
VancedDownloadService::class.java
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
}.show()
|
} else {
|
||||||
} else {
|
view?.findNavController()?.navigate(R.id.toInstallThemeFragment)
|
||||||
if (prefs?.getBoolean("valuesModified", false)!!) {
|
}
|
||||||
requireActivity().startService(
|
|
||||||
Intent(
|
|
||||||
requireActivity(),
|
|
||||||
VancedDownloadService::class.java
|
|
||||||
)
|
|
||||||
)
|
|
||||||
} else {
|
|
||||||
view?.findNavController()?.navigate(R.id.toInstallThemeFragment)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
} else
|
} else
|
||||||
Toast.makeText(requireActivity(), R.string.installation_wait, Toast.LENGTH_SHORT)
|
Toast.makeText(requireActivity(), R.string.installation_wait, Toast.LENGTH_SHORT)
|
||||||
|
|
||||||
|
|
|
@ -75,7 +75,7 @@ open class HomeViewModel(application: Application): AndroidViewModel(application
|
||||||
microgInstalled.set(isPackageInstalled("com.mgoogle.android.gms", pm))
|
microgInstalled.set(isPackageInstalled("com.mgoogle.android.gms", pm))
|
||||||
vancedInstalled.set(isPackageInstalled(vancedPkgName, pm))
|
vancedInstalled.set(isPackageInstalled(vancedPkgName, pm))
|
||||||
vancedInstalledVersion.set(getPkgInfo(vancedInstalled.get()!!, vancedPkgName, getApplication()))
|
vancedInstalledVersion.set(getPkgInfo(vancedInstalled.get()!!, vancedPkgName, getApplication()))
|
||||||
microgInstalledVersion.set(getPkgInfo(microgInstalled.get()!!, "com.mgoogle.android.gms", getApplication()))
|
microgInstalledVersion.set(getPkgInfo(microgInstalled.get()!!, "com.mgoogle.android.gms", getApplication()).removeSuffix("-vanced"))
|
||||||
vancedVersionCode.set(getJsonInt("vanced.json", "versionCode", getApplication()))
|
vancedVersionCode.set(getJsonInt("vanced.json", "versionCode", getApplication()))
|
||||||
microgVersionCode.set(getJsonInt("microg.json", "versionCode", getApplication()))
|
microgVersionCode.set(getJsonInt("microg.json", "versionCode", getApplication()))
|
||||||
vancedInstalledVersionCode.set(getPkgVerCode(vancedInstalled.get()!!, vancedPkgName))
|
vancedInstalledVersionCode.set(getPkgVerCode(vancedInstalled.get()!!, vancedPkgName))
|
||||||
|
@ -167,6 +167,7 @@ open class HomeViewModel(application: Application): AndroidViewModel(application
|
||||||
}
|
}
|
||||||
|
|
||||||
init {
|
init {
|
||||||
|
fetching.set(false)
|
||||||
fetchData()
|
fetchData()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -10,15 +10,6 @@
|
||||||
android:id="@+id/vanced_changelog"
|
android:id="@+id/vanced_changelog"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:textSize="16sp"
|
android:textSize="16sp" />
|
||||||
android:text="Removed:\n
|
|
||||||
- Auto subtitles (has been replaced with live captions)\n
|
|
||||||
- minimised video player style (Google removed it) \n
|
|
||||||
- auto repeat (might be fixed later) \n
|
|
||||||
- accessibility seek buttons (might be fixed later) \n\nChanged:\n
|
|
||||||
- Whatever Youtube fixed over 9 months :P \n
|
|
||||||
- some small bugs \n
|
|
||||||
- Installation now with SAI"
|
|
||||||
tools:ignore="HardcodedText" />
|
|
||||||
|
|
||||||
</FrameLayout>
|
</FrameLayout>
|
Loading…
Reference in New Issue