mirror of
https://gitlab.futo.org/videostreaming/grayjay.git
synced 2025-04-20 03:24:50 +00:00
Update trigger on exception update button pressed
This commit is contained in:
parent
d44df42727
commit
88d687f26e
3 changed files with 11 additions and 2 deletions
|
@ -300,7 +300,7 @@ class UIDialogs {
|
|||
if(ex is PluginException) ex.code else null,
|
||||
1,
|
||||
UIDialogs.Action(context.getString(R.string.update), {
|
||||
mainFragment.navigate<SourceDetailFragment>(pluginConfig);
|
||||
mainFragment.navigate<SourceDetailFragment>(SourceDetailFragment.UpdatePluginAction(pluginConfig));
|
||||
if(mainFragment is VideoDetailFragment)
|
||||
mainFragment.minimizeVideoDetail();
|
||||
}, UIDialogs.ActionStyle.ACCENT),
|
||||
|
|
|
@ -57,8 +57,8 @@ import com.futo.platformplayer.states.StatePlatform
|
|||
import com.futo.platformplayer.states.StatePlugins
|
||||
import kotlinx.serialization.encodeToString
|
||||
import kotlinx.serialization.json.Json
|
||||
import java.lang.Exception
|
||||
import java.time.OffsetDateTime
|
||||
import kotlin.Exception
|
||||
import kotlin.reflect.full.findAnnotations
|
||||
import kotlin.reflect.jvm.kotlinFunction
|
||||
import kotlin.streams.asSequence
|
||||
|
|
|
@ -101,6 +101,11 @@ class SourceDetailFragment : MainFragment() {
|
|||
loadConfig(parameter);
|
||||
updateSourceViews();
|
||||
}
|
||||
else if(parameter is UpdatePluginAction) {
|
||||
loadConfig(parameter.config);
|
||||
updateSourceViews();
|
||||
checkForUpdatesSource();
|
||||
}
|
||||
|
||||
setLoading(false);
|
||||
}
|
||||
|
@ -567,4 +572,8 @@ class SourceDetailFragment : MainFragment() {
|
|||
const val TAG = "SourceDetailFragment";
|
||||
fun newInstance() = SourceDetailFragment().apply {}
|
||||
}
|
||||
|
||||
class UpdatePluginAction(val config: SourcePluginConfig) {
|
||||
|
||||
}
|
||||
}
|
Loading…
Add table
Reference in a new issue