mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-07-25 15:04:57 +00:00
ec7c76b8d2
Iv::ShowButton() and LocationPicker::Available() each called Webview::Availability() separately (~200ms each on Linux). Replace the per-caller static caches with a single shared cache in Core::CachedWebviewAvailability(), reducing startup from two ~200ms calls to one.
20 lines
481 B
C++
20 lines
481 B
C++
/*
|
|
This file is part of Telegram Desktop,
|
|
the official desktop application for the Telegram messaging service.
|
|
|
|
For license and copyright information please follow this link:
|
|
https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|
*/
|
|
#pragma once
|
|
|
|
#include "webview/webview_interface.h"
|
|
|
|
namespace Core {
|
|
|
|
[[nodiscard]] inline const Webview::Available &CachedWebviewAvailability() {
|
|
static const auto result = Webview::Availability();
|
|
return result;
|
|
}
|
|
|
|
} // namespace Core
|