mirror of
https://github.com/libre-tube/LibreTube.git
synced 2024-12-14 14:20:30 +05:30
commit
493ac68ce6
@ -117,8 +117,6 @@ class CommentsAdapter(
|
|||||||
Toast.makeText(root.context, R.string.copied, Toast.LENGTH_SHORT).show()
|
Toast.makeText(root.context, R.string.copied, Toast.LENGTH_SHORT).show()
|
||||||
true
|
true
|
||||||
}
|
}
|
||||||
|
|
||||||
// if (isRepliesAdapter && comments)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -32,9 +32,9 @@ class ShareDialog(
|
|||||||
// add instanceUrl option if custom instance frontend url available
|
// add instanceUrl option if custom instance frontend url available
|
||||||
if (instanceUrl != "") shareOptions += getString(R.string.instance)
|
if (instanceUrl != "") shareOptions += getString(R.string.instance)
|
||||||
|
|
||||||
if (position != null) {
|
if (shareObjectType == ShareObjectType.VIDEO && position != null) {
|
||||||
binding = DialogShareBinding.inflate(layoutInflater)
|
binding = DialogShareBinding.inflate(layoutInflater)
|
||||||
binding!!.timeCodeSwitch.isChecked = PreferenceHelper.getBoolean(
|
binding?.timeCodeSwitch?.isChecked = PreferenceHelper.getBoolean(
|
||||||
PreferenceKeys.SHARE_WITH_TIME_CODE,
|
PreferenceKeys.SHARE_WITH_TIME_CODE,
|
||||||
true
|
true
|
||||||
)
|
)
|
||||||
@ -51,14 +51,14 @@ class ShareDialog(
|
|||||||
// only available for custom instances
|
// only available for custom instances
|
||||||
else -> instanceUrl
|
else -> instanceUrl
|
||||||
}
|
}
|
||||||
var path = when (shareObjectType) {
|
val path = when (shareObjectType) {
|
||||||
ShareObjectType.VIDEO -> "/watch?v=$id"
|
ShareObjectType.VIDEO -> "/watch?v=$id"
|
||||||
ShareObjectType.PLAYLIST -> "/playlist?list=$id"
|
ShareObjectType.PLAYLIST -> "/playlist?list=$id"
|
||||||
else -> "/c/$id"
|
else -> "/channel/$id"
|
||||||
}
|
}
|
||||||
var url = "$host$path"
|
var url = "$host$path"
|
||||||
|
|
||||||
if (binding != null && binding!!.timeCodeSwitch.isChecked) {
|
if (shareObjectType == ShareObjectType.VIDEO && binding!!.timeCodeSwitch.isChecked) {
|
||||||
url += "&t=$position"
|
url += "&t=$position"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -127,7 +127,7 @@ class ChannelFragment : BaseFragment() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
binding.channelShare.setOnClickListener {
|
binding.channelShare.setOnClickListener {
|
||||||
val shareDialog = ShareDialog(response.name!!, ShareObjectType.CHANNEL)
|
val shareDialog = ShareDialog(response.id!!.toID(), ShareObjectType.CHANNEL)
|
||||||
shareDialog.show(childFragmentManager, ShareDialog::class.java.name)
|
shareDialog.show(childFragmentManager, ShareDialog::class.java.name)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user