Use new global shortcuts interface.

This commit is contained in:
John Preston 2020-12-06 12:41:45 +04:00
parent 8b2d75502b
commit 8f11868bb6
5 changed files with 8 additions and 10 deletions

View file

@ -21,7 +21,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "data/data_channel.h"
#include "data/data_group_call.h"
#include "data/data_session.h"
#include "base/platform/base_platform_global_shortcuts.h"
#include "base/global_shortcuts.h"
#include <tgcalls/group/GroupInstanceImpl.h>
@ -715,7 +715,7 @@ std::variant<int, not_null<UserData*>> GroupCall::inviteUsers(
auto GroupCall::ensureGlobalShortcutManager()
-> std::shared_ptr<GlobalShortcutManager> {
if (!_shortcutManager) {
_shortcutManager = base::Platform::CreateGlobalShortcutManager();
_shortcutManager = base::CreateGlobalShortcutManager();
}
return _shortcutManager;
}

View file

@ -20,10 +20,8 @@ class GroupInstanceImpl;
} // namespace tgcalls
namespace base {
namespace Platform {
class GlobalShortcutManager;
class GlobalShortcutValue;
} // namespace Platform
} // namespace base
namespace Calls {
@ -51,7 +49,7 @@ public:
};
using GlobalShortcutManager = base::Platform::GlobalShortcutManager;
using GlobalShortcutManager = base::GlobalShortcutManager;
GroupCall(
not_null<Delegate*> delegate,
@ -119,7 +117,7 @@ public:
}
private:
using GlobalShortcutValue = base::Platform::GlobalShortcutValue;
using GlobalShortcutValue = base::GlobalShortcutValue;
enum class FinishType {
None,

View file

@ -16,7 +16,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "ui/toast/toast.h"
#include "lang/lang_keys.h"
#include "base/event_filter.h"
#include "base/platform/base_platform_global_shortcuts.h"
#include "base/global_shortcuts.h"
#include "data/data_channel.h"
#include "data/data_group_call.h"
#include "core/application.h"
@ -159,7 +159,7 @@ void GroupCallSettingsBox(
//AddDivider(layout);
//AddSkip(layout);
using namespace base::Platform;
using GlobalShortcut = base::GlobalShortcut;
struct PushToTalkState {
rpl::variable<QString> recordText = tr::lng_group_call_ptt_shortcut();
rpl::variable<QString> shortcutText;

@ -1 +1 @@
Subproject commit 7d1df24be11eb6b3e6382735b73418b4a282bad4
Subproject commit 79b9ed178aa1fa9779afb51470f571c4153866fc

@ -1 +1 @@
Subproject commit 5f44304a305f9d02823e2d7ded9aadd59463e5a5
Subproject commit f24411cd96b2e3503d572418a63d2df8bae90fc9