Fix indentation & other minor fixes (#5)
This commit is contained in:
parent
f923f63429
commit
371ba03f2c
25 changed files with 66 additions and 65 deletions
|
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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,10 +866,10 @@ 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,
|
||||||
|
|
@ -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,
|
||||||
|
|
|
||||||
|
|
@ -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()
|
||||||
|
|
|
||||||
|
|
@ -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());
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
|
||||||
|
|
@ -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;
|
||||||
|
|
|
||||||
|
|
@ -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();
|
||||||
|
|
|
||||||
|
|
@ -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) {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue