0
0
Fork 0
mirror of https://github.com/YTVanced/VancedManager synced 2024-11-26 21:13:01 +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)
}
/*val microgVerText = view.findViewById<TextView>(R.id.microg_installed_version)
val microgVerText = view.findViewById<TextView>(R.id.microg_installed_version)
if (microgStatus!!) {
val microgVer = pm.getPackageInfo("com.mgoogle.android.gms", 0).versionName
microguninstallbtn.setOnClickListener {
@ -68,9 +68,9 @@ open class Home : BaseFragment() {
microgsettingsbtn.visibility = View.INVISIBLE
microguninstallbtn.visibility = View.INVISIBLE
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!!) {
val vancedVer = pm.getPackageInfo("com.vanced.android.youtube", 0).versionName
vanceduninstallbtn.setOnClickListener {
@ -82,7 +82,7 @@ open class Home : BaseFragment() {
} else {
vanceduninstallbtn.visibility = View.INVISIBLE
vancedVerText.text = getString(R.string.unavailable)
}*/
}
bravebtn.setOnClickListener {
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.content.pm.PackageManager
import androidx.lifecycle.ViewModel
import com.vanced.manager.R
class HomeViewModel {
@ -23,8 +22,6 @@ class HomeViewModel {
}
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"?>
<layout
<com.google.android.material.card.MaterialCardView
xmlns:android="http://schemas.android.com/apk/res/android"
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">
<androidx.constraintlayout.widget.ConstraintLayout
@ -91,7 +77,7 @@
<TextView
style="@style/AppVer.Bold"
android:id="@+id/microg_installed_version"
android:text="@{viewModel.microgStatus ? viewModel.microgInstalledTxt : @string/unavailable}" />
android:text="@string/loading" />
</LinearLayout>
@ -102,8 +88,7 @@
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@id/microg_uninstallbtn"
app:layout_constraintTop_toBottomOf="@id/microg_title_buttons_barrier"
android:layout_marginEnd="4dp"
android:visibility="@{viewModel.microgStatus ? View.VISIBLE : View.GONE}"/>
android:layout_marginEnd="4dp"/>
<ImageView
style="@style/ClickableImageWidget.Red"
@ -111,11 +96,8 @@
app:srcCompat="@drawable/ic_delete_black_24dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@id/microg_title_buttons_barrier"
android:visibility="@{viewModel.microgStatus ? View.VISIBLE : View.GONE}"/>
app:layout_constraintTop_toBottomOf="@id/microg_title_buttons_barrier" />
</androidx.constraintlayout.widget.ConstraintLayout>
</com.google.android.material.card.MaterialCardView>
</layout>
</com.google.android.material.card.MaterialCardView>

View file

@ -1,23 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<layout
<com.google.android.material.card.MaterialCardView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
style="@style/MaterialCard"
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
android:layout_width="match_parent"
android:layout_height="wrap_content">
@ -29,8 +17,7 @@
app:srcCompat="@drawable/ic_vanced"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toTopOf="@id/vanced_title_buttons_barrier"
android:visibility="@{viewModel.vancedStatus ? View.VISIBLE : View.GONE}"/>
app:layout_constraintBottom_toTopOf="@id/vanced_title_buttons_barrier" />
<TextView
style="@style/TextAppTitle"
@ -98,14 +85,12 @@
<TextView
style="@style/AppVer.Bold"
android:id="@+id/vanced_installed_version"
android:text="@{viewModel.vancedStatus ? viewModel.vancedInstalledTxt : @string/unavailable}" />
android:text="@string/loading" />
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</com.google.android.material.card.MaterialCardView>
</com.google.android.material.card.MaterialCardView>
</layout>