mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-07 23:53:58 +02:00
Add support for tg://stars link.
This commit is contained in:
parent
27780c7327
commit
75d346fe69
1 changed files with 17 additions and 0 deletions
|
@ -1514,6 +1514,19 @@ bool ResolveConferenceCall(
|
||||||
controller->resolveConferenceCall(match->captured(1), myContext.itemId);
|
controller->resolveConferenceCall(match->captured(1), myContext.itemId);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool ResolveStarsSettings(
|
||||||
|
Window::SessionController *controller,
|
||||||
|
const Match &match,
|
||||||
|
const QVariant &context) {
|
||||||
|
if (!controller) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
controller->showSettings(::Settings::CreditsId());
|
||||||
|
controller->window().activate();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
const std::vector<LocalUrlHandler> &LocalUrlHandlers() {
|
const std::vector<LocalUrlHandler> &LocalUrlHandlers() {
|
||||||
|
@ -1614,6 +1627,10 @@ const std::vector<LocalUrlHandler> &LocalUrlHandlers() {
|
||||||
u"^call/?\\?slug=([a-zA-Z0-9\\.\\_\\-]+)(&|$)"_q,
|
u"^call/?\\?slug=([a-zA-Z0-9\\.\\_\\-]+)(&|$)"_q,
|
||||||
ResolveConferenceCall
|
ResolveConferenceCall
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
u"^stars/?(^\\?.*)?(#|$)"_q,
|
||||||
|
ResolveStarsSettings
|
||||||
|
},
|
||||||
{
|
{
|
||||||
u"^([^\\?]+)(\\?|#|$)"_q,
|
u"^([^\\?]+)(\\?|#|$)"_q,
|
||||||
HandleUnknown
|
HandleUnknown
|
||||||
|
|
Loading…
Add table
Reference in a new issue