add flags to extensions

This commit is contained in:
C10udburst 2022-08-17 15:51:58 +02:00
parent ef165ad4cb
commit da6d7aecd2
4 changed files with 18 additions and 2 deletions

View file

@ -22,7 +22,6 @@ import com.lagradost.cloudstream3.utils.UIHelper.fixPaddingStatusbar
import com.lagradost.cloudstream3.utils.UIHelper.navigate
import com.lagradost.cloudstream3.utils.UIHelper.setImage
import kotlinx.android.synthetic.main.main_settings.*
import kotlinx.android.synthetic.main.settings_title_top.*
import kotlinx.android.synthetic.main.standard_toolbar.*
import java.io.File

View file

@ -12,6 +12,7 @@ import com.lagradost.cloudstream3.R
import com.lagradost.cloudstream3.plugins.PluginManager
import com.lagradost.cloudstream3.utils.GlideApp
import com.lagradost.cloudstream3.utils.UIHelper.setImage
import com.lagradost.cloudstream3.utils.SubtitleHelper.getFlagFromIso
import kotlinx.android.synthetic.main.repository_item.view.*
@ -118,6 +119,13 @@ class PluginAdapter(
itemView.ext_version?.isVisible = true
itemView.ext_version?.text = "v${metadata.version}"
if (metadata.language != null) {
itemView.lang_icon?.isVisible = true
itemView.lang_icon.text = getFlagFromIso(metadata.language)
} else {
itemView.lang_icon?.isVisible = false
}
itemView.main_text?.text = metadata.name
itemView.sub_text?.text = metadata.description
}

View file

@ -128,7 +128,7 @@
android:textColor="?attr/textColor" />
<TextView
android:id="@+id/textView2"
android:id="@+id/commit_hash"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"

View file

@ -35,6 +35,15 @@
android:textSize="16sp"
tools:text="Test repository" />
<TextView
android:id="@+id/lang_icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:text="🇷🇼"
android:visibility="gone"
tools:visibility="visible" />
<TextView
android:id="@+id/ext_version"
android:layout_width="wrap_content"