mirror of https://github.com/procxx/kepka.git
Fixed build for Windows with c++latest.
This commit is contained in:
parent
5f5d5629f8
commit
b4fbff0b6c
|
@ -435,7 +435,9 @@ void EmojiKeywords::LangPack::applyDifference(
|
|||
LangPackData &&result) {
|
||||
applyData(std::move(result));
|
||||
});
|
||||
crl::async([=, callback = std::move(callback)]() mutable {
|
||||
crl::async([=,
|
||||
copy = std::move(copy),
|
||||
callback = std::move(callback)]() mutable {
|
||||
ApplyDifference(copy, keywords, version);
|
||||
WriteLocalCache(id, copy);
|
||||
crl::on_main([
|
||||
|
|
|
@ -45,7 +45,6 @@ enum {
|
|||
|
||||
StickerMaxSize = 2048, // 2048x2048 is a max image size for sticker
|
||||
|
||||
MaxZoomLevel = 7, // x8
|
||||
ZoomToScreenLevel = 1024, // just constant
|
||||
|
||||
PreloadHeightsCount = 3, // when 3 screens to scroll left make a preload request
|
||||
|
|
|
@ -68,6 +68,7 @@ namespace View {
|
|||
namespace {
|
||||
|
||||
constexpr auto kPreloadCount = 4;
|
||||
constexpr auto kMaxZoomLevel = 7; // x8
|
||||
|
||||
constexpr auto kOverlayLoaderPriority = 2;
|
||||
|
||||
|
@ -897,13 +898,13 @@ bool OverlayWidget::radialAnimationCallback(crl::time now) {
|
|||
void OverlayWidget::zoomIn() {
|
||||
int32 newZoom = _zoom;
|
||||
if (newZoom == ZoomToScreenLevel) {
|
||||
if (qCeil(_zoomToScreen) <= MaxZoomLevel) {
|
||||
if (qCeil(_zoomToScreen) <= kMaxZoomLevel) {
|
||||
newZoom = qCeil(_zoomToScreen);
|
||||
}
|
||||
} else {
|
||||
if (newZoom < _zoomToScreen && (newZoom + 1 > _zoomToScreen || (_zoomToScreen > MaxZoomLevel && newZoom == MaxZoomLevel))) {
|
||||
if (newZoom < _zoomToScreen && (newZoom + 1 > _zoomToScreen || (_zoomToScreen > kMaxZoomLevel && newZoom == kMaxZoomLevel))) {
|
||||
newZoom = ZoomToScreenLevel;
|
||||
} else if (newZoom < MaxZoomLevel) {
|
||||
} else if (newZoom < kMaxZoomLevel) {
|
||||
++newZoom;
|
||||
}
|
||||
}
|
||||
|
@ -913,13 +914,13 @@ void OverlayWidget::zoomIn() {
|
|||
void OverlayWidget::zoomOut() {
|
||||
int32 newZoom = _zoom;
|
||||
if (newZoom == ZoomToScreenLevel) {
|
||||
if (qFloor(_zoomToScreen) >= -MaxZoomLevel) {
|
||||
if (qFloor(_zoomToScreen) >= -kMaxZoomLevel) {
|
||||
newZoom = qFloor(_zoomToScreen);
|
||||
}
|
||||
} else {
|
||||
if (newZoom > _zoomToScreen && (newZoom - 1 < _zoomToScreen || (_zoomToScreen < -MaxZoomLevel && newZoom == -MaxZoomLevel))) {
|
||||
if (newZoom > _zoomToScreen && (newZoom - 1 < _zoomToScreen || (_zoomToScreen < -kMaxZoomLevel && newZoom == -kMaxZoomLevel))) {
|
||||
newZoom = ZoomToScreenLevel;
|
||||
} else if (newZoom > -MaxZoomLevel) {
|
||||
} else if (newZoom > -kMaxZoomLevel) {
|
||||
--newZoom;
|
||||
}
|
||||
}
|
||||
|
@ -929,7 +930,7 @@ void OverlayWidget::zoomOut() {
|
|||
void OverlayWidget::zoomReset() {
|
||||
int32 newZoom = _zoom;
|
||||
if (_zoom == 0) {
|
||||
if (qFloor(_zoomToScreen) == qCeil(_zoomToScreen) && qRound(_zoomToScreen) >= -MaxZoomLevel && qRound(_zoomToScreen) <= MaxZoomLevel) {
|
||||
if (qFloor(_zoomToScreen) == qCeil(_zoomToScreen) && qRound(_zoomToScreen) >= -kMaxZoomLevel && qRound(_zoomToScreen) <= kMaxZoomLevel) {
|
||||
newZoom = qRound(_zoomToScreen);
|
||||
} else {
|
||||
newZoom = ZoomToScreenLevel;
|
||||
|
|
|
@ -61,7 +61,7 @@ void Calls::sectionSaveChanges(FnMut<void()> done) {
|
|||
}
|
||||
|
||||
void Calls::setupContent(not_null<Window::SessionController*> controller) {
|
||||
using namespace tgvoip;
|
||||
using VoIP = tgvoip::VoIPController;
|
||||
|
||||
const auto content = Ui::CreateChild<Ui::VerticalLayout>(this);
|
||||
const auto getId = [](const auto &device) {
|
||||
|
@ -75,7 +75,7 @@ void Calls::setupContent(not_null<Window::SessionController*> controller) {
|
|||
if (Global::CallOutputDeviceID() == qsl("default")) {
|
||||
return tr::lng_settings_call_device_default(tr::now);
|
||||
}
|
||||
const auto &list = VoIPController::EnumerateAudioOutputs();
|
||||
const auto &list = VoIP::EnumerateAudioOutputs();
|
||||
const auto i = ranges::find(
|
||||
list,
|
||||
Global::CallOutputDeviceID(),
|
||||
|
@ -89,7 +89,7 @@ void Calls::setupContent(not_null<Window::SessionController*> controller) {
|
|||
if (Global::CallInputDeviceID() == qsl("default")) {
|
||||
return tr::lng_settings_call_device_default(tr::now);
|
||||
}
|
||||
const auto &list = VoIPController::EnumerateAudioInputs();
|
||||
const auto &list = VoIP::EnumerateAudioInputs();
|
||||
const auto i = ranges::find(
|
||||
list,
|
||||
Global::CallInputDeviceID(),
|
||||
|
@ -111,7 +111,7 @@ void Calls::setupContent(not_null<Window::SessionController*> controller) {
|
|||
),
|
||||
st::settingsButton
|
||||
)->addClickHandler([=] {
|
||||
const auto &devices = VoIPController::EnumerateAudioOutputs();
|
||||
const auto &devices = VoIP::EnumerateAudioOutputs();
|
||||
const auto options = ranges::view::concat(
|
||||
ranges::view::single(tr::lng_settings_call_device_default(tr::now)),
|
||||
devices | ranges::view::transform(getName)
|
||||
|
@ -186,7 +186,7 @@ void Calls::setupContent(not_null<Window::SessionController*> controller) {
|
|||
),
|
||||
st::settingsButton
|
||||
)->addClickHandler([=] {
|
||||
const auto &devices = VoIPController::EnumerateAudioInputs();
|
||||
const auto &devices = VoIP::EnumerateAudioInputs();
|
||||
const auto options = ranges::view::concat(
|
||||
ranges::view::single(tr::lng_settings_call_device_default(tr::now)),
|
||||
devices | ranges::view::transform(getName)
|
||||
|
|
Loading…
Reference in New Issue