mirror of
https://github.com/libre-tube/LibreTube.git
synced 2025-04-28 07:50:31 +05:30
move urls to constants
This commit is contained in:
parent
9993cd0b4e
commit
fb3bb67933
@ -21,3 +21,9 @@ const val MATRIX_URL = "https://matrix.to/#/#LibreTube:matrix.org"
|
||||
const val DISCORD_URL = "https://discord.com/invite/Qc34xCj2GV"
|
||||
const val REDDIT_URL = "https://www.reddit.com/r/Libretube/"
|
||||
const val TWITTER_URL = "https://twitter.com/libretube"
|
||||
|
||||
/**
|
||||
* Share Dialog
|
||||
*/
|
||||
const val PIPED_FRONTEND_URL = "https://piped.kavin.rocks"
|
||||
const val YOUTUBE_FRONTEND_URL = "https://www.youtube.com"
|
@ -4,7 +4,9 @@ import android.app.Dialog
|
||||
import android.content.Intent
|
||||
import android.os.Bundle
|
||||
import androidx.fragment.app.DialogFragment
|
||||
import com.github.libretube.PIPED_FRONTEND_URL
|
||||
import com.github.libretube.R
|
||||
import com.github.libretube.YOUTUBE_FRONTEND_URL
|
||||
import com.github.libretube.preferences.PreferenceHelper
|
||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
||||
|
||||
@ -30,8 +32,8 @@ class ShareDialog(
|
||||
shareOptions
|
||||
) { _, which ->
|
||||
val host = when (which) {
|
||||
0 -> "https://piped.kavin.rocks"
|
||||
1 -> "https://youtube.com"
|
||||
0 -> PIPED_FRONTEND_URL
|
||||
1 -> YOUTUBE_FRONTEND_URL
|
||||
// only available for custom instances
|
||||
else -> instanceUrl
|
||||
}
|
||||
|
@ -34,7 +34,6 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:elevation="1dp"
|
||||
android:text="@string/subscribe"
|
||||
android:textColor="?android:attr/textColorPrimary"
|
||||
android:textSize="12sp"
|
||||
|
@ -80,7 +80,6 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:drawableLeft="@drawable/ic_bell_small"
|
||||
android:drawableTint="?android:attr/textColorPrimary"
|
||||
android:elevation="20dp"
|
||||
android:text="@string/subscribe"
|
||||
android:textColor="?android:attr/textColorPrimary"
|
||||
android:textSize="12sp"
|
||||
|
Loading…
x
Reference in New Issue
Block a user