mirror of
https://gitlab.futo.org/videostreaming/grayjay.git
synced 2025-08-02 22:30:40 +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,
|
if(ex is PluginException) ex.code else null,
|
||||||
1,
|
1,
|
||||||
UIDialogs.Action(context.getString(R.string.update), {
|
UIDialogs.Action(context.getString(R.string.update), {
|
||||||
mainFragment.navigate<SourceDetailFragment>(pluginConfig);
|
mainFragment.navigate<SourceDetailFragment>(SourceDetailFragment.UpdatePluginAction(pluginConfig));
|
||||||
if(mainFragment is VideoDetailFragment)
|
if(mainFragment is VideoDetailFragment)
|
||||||
mainFragment.minimizeVideoDetail();
|
mainFragment.minimizeVideoDetail();
|
||||||
}, UIDialogs.ActionStyle.ACCENT),
|
}, UIDialogs.ActionStyle.ACCENT),
|
||||||
|
|
|
@ -57,8 +57,8 @@ import com.futo.platformplayer.states.StatePlatform
|
||||||
import com.futo.platformplayer.states.StatePlugins
|
import com.futo.platformplayer.states.StatePlugins
|
||||||
import kotlinx.serialization.encodeToString
|
import kotlinx.serialization.encodeToString
|
||||||
import kotlinx.serialization.json.Json
|
import kotlinx.serialization.json.Json
|
||||||
import java.lang.Exception
|
|
||||||
import java.time.OffsetDateTime
|
import java.time.OffsetDateTime
|
||||||
|
import kotlin.Exception
|
||||||
import kotlin.reflect.full.findAnnotations
|
import kotlin.reflect.full.findAnnotations
|
||||||
import kotlin.reflect.jvm.kotlinFunction
|
import kotlin.reflect.jvm.kotlinFunction
|
||||||
import kotlin.streams.asSequence
|
import kotlin.streams.asSequence
|
||||||
|
|
|
@ -101,6 +101,11 @@ class SourceDetailFragment : MainFragment() {
|
||||||
loadConfig(parameter);
|
loadConfig(parameter);
|
||||||
updateSourceViews();
|
updateSourceViews();
|
||||||
}
|
}
|
||||||
|
else if(parameter is UpdatePluginAction) {
|
||||||
|
loadConfig(parameter.config);
|
||||||
|
updateSourceViews();
|
||||||
|
checkForUpdatesSource();
|
||||||
|
}
|
||||||
|
|
||||||
setLoading(false);
|
setLoading(false);
|
||||||
}
|
}
|
||||||
|
@ -567,4 +572,8 @@ class SourceDetailFragment : MainFragment() {
|
||||||
const val TAG = "SourceDetailFragment";
|
const val TAG = "SourceDetailFragment";
|
||||||
fun newInstance() = SourceDetailFragment().apply {}
|
fun newInstance() = SourceDetailFragment().apply {}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class UpdatePluginAction(val config: SourcePluginConfig) {
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
Loading…
Add table
Add a link
Reference in a new issue