0
0
Fork 0
mirror of https://github.com/YTVanced/VancedManager synced 2024-11-27 05:23:00 +00:00

revert all changes

This commit is contained in:
X1nto 2020-05-17 12:46:42 +04:00
parent b6ea249dd7
commit f81bb2f0e6
4 changed files with 159 additions and 195 deletions

View file

@ -46,7 +46,7 @@ open class Home : BaseFragment() {
openUrl("https://youtu.be/dQw4w9WgXcQ", R.color.YT) openUrl("https://youtu.be/dQw4w9WgXcQ", R.color.YT)
} }
/*val microgVerText = view.findViewById<TextView>(R.id.microg_installed_version) val microgVerText = view.findViewById<TextView>(R.id.microg_installed_version)
if (microgStatus!!) { if (microgStatus!!) {
val microgVer = pm.getPackageInfo("com.mgoogle.android.gms", 0).versionName val microgVer = pm.getPackageInfo("com.mgoogle.android.gms", 0).versionName
microguninstallbtn.setOnClickListener { microguninstallbtn.setOnClickListener {
@ -68,9 +68,9 @@ open class Home : BaseFragment() {
microgsettingsbtn.visibility = View.INVISIBLE microgsettingsbtn.visibility = View.INVISIBLE
microguninstallbtn.visibility = View.INVISIBLE microguninstallbtn.visibility = View.INVISIBLE
microgVerText.text = getString(R.string.unavailable) microgVerText.text = getString(R.string.unavailable)
}*/ }
/*val vancedVerText = view.findViewById<TextView>(R.id.vanced_installed_version) val vancedVerText = view.findViewById<TextView>(R.id.vanced_installed_version)
if (vancedStatus!!) { if (vancedStatus!!) {
val vancedVer = pm.getPackageInfo("com.vanced.android.youtube", 0).versionName val vancedVer = pm.getPackageInfo("com.vanced.android.youtube", 0).versionName
vanceduninstallbtn.setOnClickListener { vanceduninstallbtn.setOnClickListener {
@ -82,7 +82,7 @@ open class Home : BaseFragment() {
} else { } else {
vanceduninstallbtn.visibility = View.INVISIBLE vanceduninstallbtn.visibility = View.INVISIBLE
vancedVerText.text = getString(R.string.unavailable) vancedVerText.text = getString(R.string.unavailable)
}*/ }
bravebtn.setOnClickListener { bravebtn.setOnClickListener {
openUrl("https://brave.com/van874", R.color.Brave) openUrl("https://brave.com/van874", R.color.Brave)

View file

@ -3,7 +3,6 @@ package com.vanced.manager.ui.fragments
import android.app.Activity import android.app.Activity
import android.content.pm.PackageManager import android.content.pm.PackageManager
import androidx.lifecycle.ViewModel import androidx.lifecycle.ViewModel
import com.vanced.manager.R
class HomeViewModel { class HomeViewModel {
@ -23,8 +22,6 @@ class HomeViewModel {
} }
val microgInstalledTxt: String? = pm?.getPackageInfo("com.mgoogle.android.gms", 0)?.versionName val microgInstalledTxt: String? = pm?.getPackageInfo("com.mgoogle.android.gms", 0)?.versionName
val vancedInstalledTxt: String? = pm?.getPackageInfo("com.vanced.android.youtube", 0)?.versionName.toString() val vancedInstalledTxt: String? = pm?.getPackageInfo("com.vanced.android.youtube", 0)?.versionName
} }

View file

@ -1,21 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<layout <com.google.android.material.card.MaterialCardView
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
tools:ignore="ContentDescription, KeyboardInaccessibleWidget">
<data>
<import type="android.view.View" />
<variable
name="viewModel"
type="com.vanced.manager.ui.fragments.HomeViewModel" />
</data>
<com.google.android.material.card.MaterialCardView
style="@style/MaterialCard"> style="@style/MaterialCard">
<androidx.constraintlayout.widget.ConstraintLayout <androidx.constraintlayout.widget.ConstraintLayout
@ -91,7 +77,7 @@
<TextView <TextView
style="@style/AppVer.Bold" style="@style/AppVer.Bold"
android:id="@+id/microg_installed_version" android:id="@+id/microg_installed_version"
android:text="@{viewModel.microgStatus ? viewModel.microgInstalledTxt : @string/unavailable}" /> android:text="@string/loading" />
</LinearLayout> </LinearLayout>
@ -102,8 +88,7 @@
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@id/microg_uninstallbtn" app:layout_constraintEnd_toStartOf="@id/microg_uninstallbtn"
app:layout_constraintTop_toBottomOf="@id/microg_title_buttons_barrier" app:layout_constraintTop_toBottomOf="@id/microg_title_buttons_barrier"
android:layout_marginEnd="4dp" android:layout_marginEnd="4dp"/>
android:visibility="@{viewModel.microgStatus ? View.VISIBLE : View.GONE}"/>
<ImageView <ImageView
style="@style/ClickableImageWidget.Red" style="@style/ClickableImageWidget.Red"
@ -111,11 +96,8 @@
app:srcCompat="@drawable/ic_delete_black_24dp" app:srcCompat="@drawable/ic_delete_black_24dp"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@id/microg_title_buttons_barrier" app:layout_constraintTop_toBottomOf="@id/microg_title_buttons_barrier" />
android:visibility="@{viewModel.microgStatus ? View.VISIBLE : View.GONE}"/>
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>
</com.google.android.material.card.MaterialCardView> </com.google.android.material.card.MaterialCardView>
</layout>

View file

@ -1,23 +1,11 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<layout <com.google.android.material.card.MaterialCardView
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
style="@style/MaterialCard"
tools:ignore="ContentDescription, KeyboardInaccessibleWidget"> tools:ignore="ContentDescription, KeyboardInaccessibleWidget">
<data>
<import type="android.view.View" />
<variable
name="viewModel"
type="com.vanced.manager.ui.fragments.HomeViewModel" />
</data>
<com.google.android.material.card.MaterialCardView
style="@style/MaterialCard">
<androidx.constraintlayout.widget.ConstraintLayout <androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"> android:layout_height="wrap_content">
@ -29,8 +17,7 @@
app:srcCompat="@drawable/ic_vanced" app:srcCompat="@drawable/ic_vanced"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toTopOf="@id/vanced_title_buttons_barrier" app:layout_constraintBottom_toTopOf="@id/vanced_title_buttons_barrier" />
android:visibility="@{viewModel.vancedStatus ? View.VISIBLE : View.GONE}"/>
<TextView <TextView
style="@style/TextAppTitle" style="@style/TextAppTitle"
@ -98,7 +85,7 @@
<TextView <TextView
style="@style/AppVer.Bold" style="@style/AppVer.Bold"
android:id="@+id/vanced_installed_version" android:id="@+id/vanced_installed_version"
android:text="@{viewModel.vancedStatus ? viewModel.vancedInstalledTxt : @string/unavailable}" /> android:text="@string/loading" />
</LinearLayout> </LinearLayout>
@ -107,5 +94,3 @@
</com.google.android.material.card.MaterialCardView> </com.google.android.material.card.MaterialCardView>
</layout>