Fix indentation & other minor fixes (#5)
This commit is contained in:
parent
f923f63429
commit
371ba03f2c
25 changed files with 66 additions and 65 deletions
2
.github/workflows/release.yml
vendored
2
.github/workflows/release.yml
vendored
|
|
@ -174,7 +174,7 @@ jobs:
|
||||||
build_linux:
|
build_linux:
|
||||||
name: Linux
|
name: Linux
|
||||||
runs-on: ubuntu-16.04
|
runs-on: ubuntu-16.04
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Install packages
|
- name: Install packages
|
||||||
run: |
|
run: |
|
||||||
|
|
|
||||||
|
|
@ -53,10 +53,10 @@ void RemoveQuarantineAttribute(NSString *path) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void RemoveQuarantineFromBundle(NSString *path) {
|
void RemoveQuarantineFromBundle(NSString *path) {
|
||||||
RemoveQuarantineAttribute(path);
|
RemoveQuarantineAttribute(path);
|
||||||
RemoveQuarantineAttribute([path stringByAppendingString:@"/Contents/MacOS/Kotatogram"]);
|
RemoveQuarantineAttribute([path stringByAppendingString:@"/Contents/MacOS/Kotatogram"]);
|
||||||
RemoveQuarantineAttribute([path stringByAppendingString:@"/Contents/Helpers/crashpad_handler"]);
|
RemoveQuarantineAttribute([path stringByAppendingString:@"/Contents/Helpers/crashpad_handler"]);
|
||||||
RemoveQuarantineAttribute([path stringByAppendingString:@"/Contents/Frameworks/Updater"]);
|
RemoveQuarantineAttribute([path stringByAppendingString:@"/Contents/Frameworks/Updater"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
void delFolder() {
|
void delFolder() {
|
||||||
|
|
|
||||||
|
|
@ -927,4 +927,3 @@ fontsBoxTextStyle: TextStyle(defaultTextStyle) {
|
||||||
linkFont: font(13px);
|
linkFont: font(13px);
|
||||||
linkFontOver: font(13px underline);
|
linkFontOver: font(13px underline);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -48,7 +48,7 @@ void FontsBox::prepare() {
|
||||||
|
|
||||||
_about.setText(st::fontsBoxTextStyle, tr::ktg_fonts_about(tr::now));
|
_about.setText(st::fontsBoxTextStyle, tr::ktg_fonts_about(tr::now));
|
||||||
_aboutHeight = _about.countHeight(st::boxWidth - st::boxPadding.left() * 1.5);
|
_aboutHeight = _about.countHeight(st::boxWidth - st::boxPadding.left() * 1.5);
|
||||||
|
|
||||||
setDimensions(st::boxWidth, _mainFontName->height() + _semiboldFontName->height() + _semiboldIsBold->height() + _monospacedFontName->height() + _aboutHeight + st::boxLittleSkip * 2);
|
setDimensions(st::boxWidth, _mainFontName->height() + _semiboldFontName->height() + _semiboldIsBold->height() + _monospacedFontName->height() + _aboutHeight + st::boxLittleSkip * 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -29,5 +29,5 @@ private:
|
||||||
|
|
||||||
object_ptr<Ui::FlatLabel> _description = { nullptr };
|
object_ptr<Ui::FlatLabel> _description = { nullptr };
|
||||||
std::shared_ptr<Ui::RadiobuttonGroup> _boostGroup;
|
std::shared_ptr<Ui::RadiobuttonGroup> _boostGroup;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
@ -178,9 +178,9 @@ bool Manager::readCustomFile() {
|
||||||
}
|
}
|
||||||
|
|
||||||
const auto settingsNetSpeedIt = settings.constFind(qsl("net_speed_boost"));
|
const auto settingsNetSpeedIt = settings.constFind(qsl("net_speed_boost"));
|
||||||
if (settingsNetSpeedIt != settings.constEnd()) {
|
if (settingsNetSpeedIt != settings.constEnd()) {
|
||||||
if ((*settingsNetSpeedIt).isString()) {
|
if ((*settingsNetSpeedIt).isString()) {
|
||||||
|
|
||||||
const auto option = (*settingsNetSpeedIt).toString();
|
const auto option = (*settingsNetSpeedIt).toString();
|
||||||
if (option == "high") {
|
if (option == "high") {
|
||||||
SetNetworkBoost(3);
|
SetNetworkBoost(3);
|
||||||
|
|
@ -294,7 +294,7 @@ void Manager::writeCurrentSettings() {
|
||||||
auto settings = QJsonObject();
|
auto settings = QJsonObject();
|
||||||
|
|
||||||
auto settingsFonts = QJsonObject();
|
auto settingsFonts = QJsonObject();
|
||||||
|
|
||||||
if (!cMainFont().isEmpty()) {
|
if (!cMainFont().isEmpty()) {
|
||||||
settingsFonts.insert(qsl("main"), cMainFont());
|
settingsFonts.insert(qsl("main"), cMainFont());
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -87,8 +87,8 @@ void PaintNarrowCounter(
|
||||||
const auto allowDigits = displayMentionBadge ? 1 : 3;
|
const auto allowDigits = displayMentionBadge ? 1 : 3;
|
||||||
auto unreadRight = st::dialogsPadding.x() + (DialogListLines() == 1 ? st::dialogsUnreadHeight : st::dialogsPhotoSize);
|
auto unreadRight = st::dialogsPadding.x() + (DialogListLines() == 1 ? st::dialogsUnreadHeight : st::dialogsPhotoSize);
|
||||||
auto unreadTop = (lines == 1
|
auto unreadTop = (lines == 1
|
||||||
? st::dialogsPadding.y()
|
? st::dialogsPadding.y()
|
||||||
: st::dialogsPadding.y() + st::dialogsPhotoSize - st::dialogsUnreadHeight);
|
: st::dialogsPadding.y() + st::dialogsPhotoSize - st::dialogsUnreadHeight);
|
||||||
auto unreadWidth = 0;
|
auto unreadWidth = 0;
|
||||||
|
|
||||||
UnreadBadgeStyle st;
|
UnreadBadgeStyle st;
|
||||||
|
|
@ -101,8 +101,8 @@ void PaintNarrowCounter(
|
||||||
auto counter = qsl("@");
|
auto counter = qsl("@");
|
||||||
auto unreadRight = st::dialogsPadding.x() + (DialogListLines() == 1 ? st::dialogsUnreadHeight : st::dialogsPhotoSize) - skipBeforeMention;
|
auto unreadRight = st::dialogsPadding.x() + (DialogListLines() == 1 ? st::dialogsUnreadHeight : st::dialogsPhotoSize) - skipBeforeMention;
|
||||||
auto unreadTop = (lines == 1
|
auto unreadTop = (lines == 1
|
||||||
? st::dialogsPadding.y()
|
? st::dialogsPadding.y()
|
||||||
: st::dialogsPadding.y() + st::dialogsPhotoSize - st::dialogsUnreadHeight);
|
: st::dialogsPadding.y() + st::dialogsPhotoSize - st::dialogsUnreadHeight);
|
||||||
auto unreadWidth = 0;
|
auto unreadWidth = 0;
|
||||||
|
|
||||||
UnreadBadgeStyle st;
|
UnreadBadgeStyle st;
|
||||||
|
|
@ -866,11 +866,11 @@ void RowPainter::paint(
|
||||||
| (peer && peer->isSelf() ? Flag::SavedMessages : Flag(0));
|
| (peer && peer->isSelf() ? Flag::SavedMessages : Flag(0));
|
||||||
const auto paintItemCallback = [&](int nameleft, int namewidth) {
|
const auto paintItemCallback = [&](int nameleft, int namewidth) {
|
||||||
const auto texttop = (DialogListLines() == 1
|
const auto texttop = (DialogListLines() == 1
|
||||||
? st::dialogsPadding.y()
|
? st::dialogsPadding.y()
|
||||||
: st::dialogsPadding.y()
|
: st::dialogsPadding.y()
|
||||||
+ st::msgNameFont->height
|
+ st::msgNameFont->height
|
||||||
+ st::dialogsSkip);
|
+ st::dialogsSkip);
|
||||||
|
|
||||||
const auto availableWidth = PaintWideCounter(
|
const auto availableWidth = PaintWideCounter(
|
||||||
p,
|
p,
|
||||||
texttop,
|
texttop,
|
||||||
|
|
@ -1030,10 +1030,10 @@ void RowPainter::paint(
|
||||||
| (row->searchInChat().feed() ? Flag::FeedSearchResult : Flag(0))*/;
|
| (row->searchInChat().feed() ? Flag::FeedSearchResult : Flag(0))*/;
|
||||||
const auto paintItemCallback = [&](int nameleft, int namewidth) {
|
const auto paintItemCallback = [&](int nameleft, int namewidth) {
|
||||||
const auto texttop = (DialogListLines() == 1
|
const auto texttop = (DialogListLines() == 1
|
||||||
? st::dialogsPadding.y()
|
? st::dialogsPadding.y()
|
||||||
: st::dialogsPadding.y()
|
: st::dialogsPadding.y()
|
||||||
+ st::msgNameFont->height
|
+ st::msgNameFont->height
|
||||||
+ st::dialogsSkip);
|
+ st::dialogsSkip);
|
||||||
const auto availableWidth = PaintWideCounter(
|
const auto availableWidth = PaintWideCounter(
|
||||||
p,
|
p,
|
||||||
texttop,
|
texttop,
|
||||||
|
|
@ -1151,7 +1151,7 @@ void PaintCollapsedRow(
|
||||||
: st::dialogsPadding.x();
|
: st::dialogsPadding.x();
|
||||||
p.drawText(left, textBaseline, text);
|
p.drawText(left, textBaseline, text);
|
||||||
} else if (!narrow) {
|
} else if (!narrow) {
|
||||||
|
|
||||||
const auto textBaseline = unreadTop
|
const auto textBaseline = unreadTop
|
||||||
+ (st::dialogsUnreadHeight - st::dialogsUnreadFont->height) / 2
|
+ (st::dialogsUnreadHeight - st::dialogsUnreadFont->height) / 2
|
||||||
+ st::dialogsUnreadFont->ascent;
|
+ st::dialogsUnreadFont->ascent;
|
||||||
|
|
|
||||||
|
|
@ -139,7 +139,7 @@ void HistoryMessageForwarded::create() const {
|
||||||
lt_user,
|
lt_user,
|
||||||
textcmdLink(1, phrase));
|
textcmdLink(1, phrase));
|
||||||
}
|
}
|
||||||
|
|
||||||
TextParseOptions opts = {
|
TextParseOptions opts = {
|
||||||
TextParseRichText,
|
TextParseRichText,
|
||||||
0,
|
0,
|
||||||
|
|
|
||||||
|
|
@ -1038,7 +1038,7 @@ void HistoryWidget::start() {
|
||||||
void HistoryWidget::onMentionInsert(UserData *user, FieldAutocomplete::ChooseMethod method) {
|
void HistoryWidget::onMentionInsert(UserData *user, FieldAutocomplete::ChooseMethod method) {
|
||||||
QString replacement, entityTag;
|
QString replacement, entityTag;
|
||||||
if (user->username.isEmpty()
|
if (user->username.isEmpty()
|
||||||
|| method == FieldAutocomplete::ChooseMethod::ByRightClick
|
|| method == FieldAutocomplete::ChooseMethod::ByRightClick
|
||||||
|| method == FieldAutocomplete::ChooseMethod::ByCtrlEnter
|
|| method == FieldAutocomplete::ChooseMethod::ByCtrlEnter
|
||||||
|| method == FieldAutocomplete::ChooseMethod::ByCtrlClick) {
|
|| method == FieldAutocomplete::ChooseMethod::ByCtrlClick) {
|
||||||
replacement = user->firstName;
|
replacement = user->firstName;
|
||||||
|
|
@ -3173,7 +3173,6 @@ MsgId HistoryWidget::highlightOrigId() const {
|
||||||
return _highlightedOriginalMessageId;
|
return _highlightedOriginalMessageId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void HistoryWidget::showAnimated(
|
void HistoryWidget::showAnimated(
|
||||||
Window::SlideDirection direction,
|
Window::SlideDirection direction,
|
||||||
const Window::SectionSlideParams ¶ms) {
|
const Window::SectionSlideParams ¶ms) {
|
||||||
|
|
|
||||||
|
|
@ -113,8 +113,8 @@ QSize Gif::countOptimalSize() {
|
||||||
}
|
}
|
||||||
|
|
||||||
const auto captionWithPaddings = _caption.maxWidth()
|
const auto captionWithPaddings = _caption.maxWidth()
|
||||||
+ st::msgPadding.left()
|
+ st::msgPadding.left()
|
||||||
+ st::msgPadding.right();
|
+ st::msgPadding.right();
|
||||||
const auto maxSize = _data->isVideoFile()
|
const auto maxSize = _data->isVideoFile()
|
||||||
? st::maxMediaSize
|
? st::maxMediaSize
|
||||||
: _data->isVideoMessage()
|
: _data->isVideoMessage()
|
||||||
|
|
@ -173,8 +173,8 @@ QSize Gif::countCurrentSize(int newWidth) {
|
||||||
auto availableWidth = newWidth;
|
auto availableWidth = newWidth;
|
||||||
|
|
||||||
const auto captionWithPaddings = _caption.maxWidth()
|
const auto captionWithPaddings = _caption.maxWidth()
|
||||||
+ st::msgPadding.left()
|
+ st::msgPadding.left()
|
||||||
+ st::msgPadding.right();
|
+ st::msgPadding.right();
|
||||||
const auto maxSize = _data->isVideoFile()
|
const auto maxSize = _data->isVideoFile()
|
||||||
? st::maxMediaSize
|
? st::maxMediaSize
|
||||||
: _data->isVideoMessage()
|
: _data->isVideoMessage()
|
||||||
|
|
@ -925,7 +925,7 @@ void Gif::drawGrouped(
|
||||||
const auto mainWidget = App::main();
|
const auto mainWidget = App::main();
|
||||||
const auto highlightedRealId = mainWidget->highlightedOriginalId();
|
const auto highlightedRealId = mainWidget->highlightedOriginalId();
|
||||||
if (realId != highlightedRealId
|
if (realId != highlightedRealId
|
||||||
&& animms
|
&& animms
|
||||||
&& animms < st::activeFadeInDuration + st::activeFadeOutDuration) {
|
&& animms < st::activeFadeInDuration + st::activeFadeOutDuration) {
|
||||||
const auto dt = (animms <= st::activeFadeInDuration)
|
const auto dt = (animms <= st::activeFadeInDuration)
|
||||||
? ((animms / float64(st::activeFadeInDuration)))
|
? ((animms / float64(st::activeFadeInDuration)))
|
||||||
|
|
@ -975,7 +975,7 @@ void Gif::drawGrouped(
|
||||||
drawHighlighted([&]() {
|
drawHighlighted([&]() {
|
||||||
p.drawImage(geometry, streamed->frame(request));
|
p.drawImage(geometry, streamed->frame(request));
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!paused) {
|
if (!paused) {
|
||||||
streamed->markFrameShown();
|
streamed->markFrameShown();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -77,8 +77,8 @@ QSize GroupedMedia::countOptimalSize() {
|
||||||
}
|
}
|
||||||
|
|
||||||
const auto captionWithPaddings = _caption.maxWidth()
|
const auto captionWithPaddings = _caption.maxWidth()
|
||||||
+ st::msgPadding.left()
|
+ st::msgPadding.left()
|
||||||
+ st::msgPadding.right();
|
+ st::msgPadding.right();
|
||||||
auto groupMaxWidth = st::historyGroupWidthMax;
|
auto groupMaxWidth = st::historyGroupWidthMax;
|
||||||
if (cAdaptiveBubbles()) {
|
if (cAdaptiveBubbles()) {
|
||||||
accumulate_max(groupMaxWidth, captionWithPaddings);
|
accumulate_max(groupMaxWidth, captionWithPaddings);
|
||||||
|
|
|
||||||
|
|
@ -72,8 +72,8 @@ QSize Photo::countOptimalSize() {
|
||||||
auto minHeight = 0;
|
auto minHeight = 0;
|
||||||
|
|
||||||
const auto captionWithPaddings = _caption.maxWidth()
|
const auto captionWithPaddings = _caption.maxWidth()
|
||||||
+ st::msgPadding.left()
|
+ st::msgPadding.left()
|
||||||
+ st::msgPadding.right();
|
+ st::msgPadding.right();
|
||||||
auto inWebPage = (_parent->media() != this);
|
auto inWebPage = (_parent->media() != this);
|
||||||
auto tw = style::ConvertScale(_data->width());
|
auto tw = style::ConvertScale(_data->width());
|
||||||
auto th = style::ConvertScale(_data->height());
|
auto th = style::ConvertScale(_data->height());
|
||||||
|
|
@ -117,8 +117,8 @@ QSize Photo::countCurrentSize(int newWidth) {
|
||||||
auto availableWidth = newWidth;
|
auto availableWidth = newWidth;
|
||||||
|
|
||||||
const auto captionWithPaddings = _caption.maxWidth()
|
const auto captionWithPaddings = _caption.maxWidth()
|
||||||
+ st::msgPadding.left()
|
+ st::msgPadding.left()
|
||||||
+ st::msgPadding.right();
|
+ st::msgPadding.right();
|
||||||
auto inWebPage = (_parent->media() != this);
|
auto inWebPage = (_parent->media() != this);
|
||||||
auto tw = style::ConvertScale(_data->width());
|
auto tw = style::ConvertScale(_data->width());
|
||||||
auto th = style::ConvertScale(_data->height());
|
auto th = style::ConvertScale(_data->height());
|
||||||
|
|
@ -399,7 +399,7 @@ void Photo::drawGrouped(
|
||||||
const auto mainWidget = App::main();
|
const auto mainWidget = App::main();
|
||||||
const auto highlightedRealId = mainWidget->highlightedOriginalId();
|
const auto highlightedRealId = mainWidget->highlightedOriginalId();
|
||||||
if (realId != highlightedRealId
|
if (realId != highlightedRealId
|
||||||
&& animms
|
&& animms
|
||||||
&& animms < st::activeFadeInDuration + st::activeFadeOutDuration) {
|
&& animms < st::activeFadeInDuration + st::activeFadeOutDuration) {
|
||||||
const auto dt = (animms <= st::activeFadeInDuration)
|
const auto dt = (animms <= st::activeFadeInDuration)
|
||||||
? ((animms / float64(st::activeFadeInDuration)))
|
? ((animms / float64(st::activeFadeInDuration)))
|
||||||
|
|
|
||||||
|
|
@ -269,7 +269,7 @@ object_ptr<Ui::RpWidget> DetailsFiller::setupInfo() {
|
||||||
tr::ktg_profile_copy_id(tr::now));
|
tr::ktg_profile_copy_id(tr::now));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (user->session().supportMode()) {
|
if (user->session().supportMode()) {
|
||||||
addInfoLineGeneric(
|
addInfoLineGeneric(
|
||||||
user->session().supportHelper().infoLabelValue(user),
|
user->session().supportHelper().infoLabelValue(user),
|
||||||
|
|
|
||||||
|
|
@ -79,8 +79,8 @@ void MemberListRow::paintAdminRank(
|
||||||
bool selected) {
|
bool selected) {
|
||||||
p.setPen(_type.rights == Rights::Creator
|
p.setPen(_type.rights == Rights::Creator
|
||||||
? st::defaultPeerListItem.statusFgActive
|
? st::defaultPeerListItem.statusFgActive
|
||||||
: selected
|
: selected
|
||||||
? st::defaultPeerListItem.statusFgOver
|
? st::defaultPeerListItem.statusFgOver
|
||||||
: st::defaultPeerListItem.statusFg);
|
: st::defaultPeerListItem.statusFg);
|
||||||
p.drawTextLeft(x, y, outerWidth, _type.adminRank, adminRankWidth());
|
p.drawTextLeft(x, y, outerWidth, _type.adminRank, adminRankWidth());
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -101,11 +101,13 @@ rpl::producer<TextWithEntities> UsernameValue(not_null<UserData*> user) {
|
||||||
}
|
}
|
||||||
|
|
||||||
rpl::producer<QString> PlainAboutValue(not_null<PeerData*> peer) {
|
rpl::producer<QString> PlainAboutValue(not_null<PeerData*> peer) {
|
||||||
/*if (const auto user = peer->asUser()) {
|
/*
|
||||||
|
if (const auto user = peer->asUser()) {
|
||||||
if (!user->isBot()) {
|
if (!user->isBot()) {
|
||||||
return rpl::single(QString());
|
return rpl::single(QString());
|
||||||
}
|
}
|
||||||
}*/
|
}
|
||||||
|
*/
|
||||||
return Notify::PeerUpdateValue(
|
return Notify::PeerUpdateValue(
|
||||||
peer,
|
peer,
|
||||||
Notify::PeerUpdate::Flag::AboutChanged
|
Notify::PeerUpdate::Flag::AboutChanged
|
||||||
|
|
|
||||||
|
|
@ -576,7 +576,7 @@ void Instance::fillDefaultJson() {
|
||||||
output.write(inputData);
|
output.write(inputData);
|
||||||
output.close();
|
output.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (outputRaw.open(QIODevice::WriteOnly)) {
|
if (outputRaw.open(QIODevice::WriteOnly)) {
|
||||||
outputRaw.write(inputData);
|
outputRaw.write(inputData);
|
||||||
outputRaw.close();
|
outputRaw.close();
|
||||||
|
|
@ -592,7 +592,7 @@ void Instance::fillFromJson() {
|
||||||
const auto langBaseDir = jsonLangDir() + (qsl("%1.json").arg(baseId()));
|
const auto langBaseDir = jsonLangDir() + (qsl("%1.json").arg(baseId()));
|
||||||
loadFromJson(langBaseDir);
|
loadFromJson(langBaseDir);
|
||||||
}
|
}
|
||||||
|
|
||||||
const auto langDefCustomDir = jsonLangDir() + (qsl("%1.default.json").arg(id()));
|
const auto langDefCustomDir = jsonLangDir() + (qsl("%1.default.json").arg(id()));
|
||||||
loadFromJson(langDefCustomDir);
|
loadFromJson(langDefCustomDir);
|
||||||
const auto langCustomDir = jsonLangDir() + (qsl("%1.json").arg(id()));
|
const auto langCustomDir = jsonLangDir() + (qsl("%1.json").arg(id()));
|
||||||
|
|
@ -635,14 +635,14 @@ void Instance::loadFromJson(const QString &filename) {
|
||||||
const auto value = langKeys.constFind(key);
|
const auto value = langKeys.constFind(key);
|
||||||
|
|
||||||
if ((*value).isString()) {
|
if ((*value).isString()) {
|
||||||
|
|
||||||
const auto name = QByteArray().append(key);
|
const auto name = QByteArray().append(key);
|
||||||
const auto translation = QByteArray().append((*value).toString());
|
const auto translation = QByteArray().append((*value).toString());
|
||||||
|
|
||||||
applyValue(name, translation);
|
applyValue(name, translation);
|
||||||
|
|
||||||
} else if ((*value).isObject()) {
|
} else if ((*value).isObject()) {
|
||||||
|
|
||||||
const auto keyPlurals = (*value).toObject();
|
const auto keyPlurals = (*value).toObject();
|
||||||
const auto pluralList = keyPlurals.keys();
|
const auto pluralList = keyPlurals.keys();
|
||||||
|
|
||||||
|
|
@ -651,8 +651,8 @@ void Instance::loadFromJson(const QString &filename) {
|
||||||
const auto pluralValue = keyPlurals.constFind(plural);
|
const auto pluralValue = keyPlurals.constFind(plural);
|
||||||
|
|
||||||
if (!(*pluralValue).isString()) {
|
if (!(*pluralValue).isString()) {
|
||||||
LOG(("Lang Info: wrong value for key %1 in %2 in file %3, string expected"
|
LOG(("Lang Info: wrong value for key %1 in %2 in file %3, string expected")
|
||||||
).arg(plural).arg(key).arg(filename));
|
.arg(plural).arg(key).arg(filename));
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -665,8 +665,8 @@ void Instance::loadFromJson(const QString &filename) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
LOG(("Lang Info: wrong value for key %1 in file %2, string or object expected"
|
LOG(("Lang Info: wrong value for key %1 in file %2, string or object expected")
|
||||||
).arg(key).arg(filename));
|
.arg(key).arg(filename));
|
||||||
}
|
}
|
||||||
if (--limit <= 0) {
|
if (--limit <= 0) {
|
||||||
break;
|
break;
|
||||||
|
|
|
||||||
|
|
@ -188,7 +188,7 @@ QString getHomeDir() {
|
||||||
|
|
||||||
QString psAppDataPath() {
|
QString psAppDataPath() {
|
||||||
// We should not use ~/.TelegramDesktop, since it's a fork.
|
// We should not use ~/.TelegramDesktop, since it's a fork.
|
||||||
|
|
||||||
// auto home = getHomeDir();
|
// auto home = getHomeDir();
|
||||||
// if (!home.isEmpty()) {
|
// if (!home.isEmpty()) {
|
||||||
// auto oldPath = home + qsl(".TelegramDesktop/");
|
// auto oldPath = home + qsl(".TelegramDesktop/");
|
||||||
|
|
|
||||||
|
|
@ -104,8 +104,8 @@ void PeerListWidget::paintItem(Painter &p, int x, int y, Item *item, bool select
|
||||||
p.setFont(st::normalFont);
|
p.setFont(st::normalFont);
|
||||||
p.setPen(item->adminState == Item::AdminState::Creator
|
p.setPen(item->adminState == Item::AdminState::Creator
|
||||||
? _st.statusFgActive
|
? _st.statusFgActive
|
||||||
: selected
|
: selected
|
||||||
? _st.statusFgOver
|
? _st.statusFgOver
|
||||||
: _st.statusFg);
|
: _st.statusFg);
|
||||||
p.drawTextLeft(nameLeft + nameWidth - item->adminRankWidth, nameTop, width(), item->adminRank, item->adminRankWidth);
|
p.drawTextLeft(nameLeft + nameWidth - item->adminRankWidth, nameTop, width(), item->adminRank, item->adminRankWidth);
|
||||||
nameWidth -= item->adminRankWidth + skip;
|
nameWidth -= item->adminRankWidth + skip;
|
||||||
|
|
|
||||||
|
|
@ -272,4 +272,4 @@ rpl::producer<int> DialogListLinesChanges() {
|
||||||
return gDialogListLines.changes();
|
return gDialogListLines.changes();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool gDisableUpEdit = false;
|
bool gDisableUpEdit = false;
|
||||||
|
|
|
||||||
|
|
@ -163,7 +163,7 @@ void SetupKotatoNetwork(not_null<Ui::VerticalLayout*> container) {
|
||||||
st::settingsButton
|
st::settingsButton
|
||||||
)->addClickHandler([=] {
|
)->addClickHandler([=] {
|
||||||
Ui::show(Box<NetBoostBox>());
|
Ui::show(Box<NetBoostBox>());
|
||||||
});
|
});
|
||||||
|
|
||||||
AddSkip(container);
|
AddSkip(container);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -896,9 +896,11 @@ rpl::producer<QString> ProfilePhotoPrivacyController::title() {
|
||||||
return tr::lng_edit_privacy_profile_photo_title();
|
return tr::lng_edit_privacy_profile_photo_title();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*bool ProfilePhotoPrivacyController::hasOption(Option option) {
|
/*
|
||||||
|
bool ProfilePhotoPrivacyController::hasOption(Option option) {
|
||||||
return (option != Option::Nobody);
|
return (option != Option::Nobody);
|
||||||
}*/
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
rpl::producer<QString> ProfilePhotoPrivacyController::optionsTitleKey() {
|
rpl::producer<QString> ProfilePhotoPrivacyController::optionsTitleKey() {
|
||||||
return tr::lng_edit_privacy_profile_photo_header();
|
return tr::lng_edit_privacy_profile_photo_header();
|
||||||
|
|
|
||||||
|
|
@ -209,7 +209,7 @@ MainMenu::MainMenu(
|
||||||
_telegram->setLinksTrusted();
|
_telegram->setLinksTrusted();
|
||||||
_version->setRichText(textcmdLink(1, currentVersionText()));
|
_version->setRichText(textcmdLink(1, currentVersionText()));
|
||||||
_version->setLink(1, std::make_shared<UrlClickHandler>(qsl("https://github.com/kotatogram/kotatogram-desktop")));
|
_version->setLink(1, std::make_shared<UrlClickHandler>(qsl("https://github.com/kotatogram/kotatogram-desktop")));
|
||||||
|
|
||||||
subscribe(_controller->session().downloaderTaskFinished(), [=] { update(); });
|
subscribe(_controller->session().downloaderTaskFinished(), [=] { update(); });
|
||||||
subscribe(Notify::PeerUpdated(), Notify::PeerUpdatedHandler(Notify::PeerUpdate::Flag::UserPhoneChanged, [this](const Notify::PeerUpdate &update) {
|
subscribe(Notify::PeerUpdated(), Notify::PeerUpdatedHandler(Notify::PeerUpdate::Flag::UserPhoneChanged, [this](const Notify::PeerUpdate &update) {
|
||||||
if (update.peer->isSelf()) {
|
if (update.peer->isSelf()) {
|
||||||
|
|
@ -444,7 +444,7 @@ void MainMenu::paintEvent(QPaintEvent *e) {
|
||||||
st::mainMenuCoverNameOnlyTop,
|
st::mainMenuCoverNameOnlyTop,
|
||||||
widthText,
|
widthText,
|
||||||
width());
|
width());
|
||||||
|
|
||||||
}
|
}
|
||||||
if (_cloudButton) {
|
if (_cloudButton) {
|
||||||
Ui::EmptyUserpic::PaintSavedMessages(
|
Ui::EmptyUserpic::PaintSavedMessages(
|
||||||
|
|
|
||||||
|
|
@ -678,7 +678,6 @@ void FolderFiller::addTogglesForArchive() {
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
|
|
||||||
void PeerMenuHidePinnedMessage(not_null<PeerData*> peer) {
|
void PeerMenuHidePinnedMessage(not_null<PeerData*> peer) {
|
||||||
auto hidden = HistoryWidget::switchPinnedHidden(peer, true);
|
auto hidden = HistoryWidget::switchPinnedHidden(peer, true);
|
||||||
if (hidden) {
|
if (hidden) {
|
||||||
|
|
|
||||||
|
|
@ -262,7 +262,7 @@ Go to ***BuildPath*** and run
|
||||||
### Building the project
|
### Building the project
|
||||||
|
|
||||||
Before refreshing, you can set build defines (skip this step if you don't need to disable anything):
|
Before refreshing, you can set build defines (skip this step if you don't need to disable anything):
|
||||||
|
|
||||||
export TDESKTOP_BUILD_DEFINES=TDESKTOP_DISABLE_CRASH_REPORTS,TDESKTOP_DISABLE_AUTOUPDATE
|
export TDESKTOP_BUILD_DEFINES=TDESKTOP_DISABLE_CRASH_REPORTS,TDESKTOP_DISABLE_AUTOUPDATE
|
||||||
|
|
||||||
Go to ***BuildPath*/tdesktop/Telegram** and run (using [your **api_id** and **api_hash**](#obtain-your-api-credentials))
|
Go to ***BuildPath*/tdesktop/Telegram** and run (using [your **api_id** and **api_hash**](#obtain-your-api-credentials))
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue