Fix indentation & other minor fixes (#5)

This commit is contained in:
ilya-fedin 2020-01-20 22:34:01 +00:00 committed by RadRussianRus
parent f923f63429
commit 371ba03f2c
25 changed files with 66 additions and 65 deletions

View file

@ -53,10 +53,10 @@ void RemoveQuarantineAttribute(NSString *path) {
}
void RemoveQuarantineFromBundle(NSString *path) {
RemoveQuarantineAttribute(path);
RemoveQuarantineAttribute([path stringByAppendingString:@"/Contents/MacOS/Kotatogram"]);
RemoveQuarantineAttribute([path stringByAppendingString:@"/Contents/Helpers/crashpad_handler"]);
RemoveQuarantineAttribute([path stringByAppendingString:@"/Contents/Frameworks/Updater"]);
RemoveQuarantineAttribute(path);
RemoveQuarantineAttribute([path stringByAppendingString:@"/Contents/MacOS/Kotatogram"]);
RemoveQuarantineAttribute([path stringByAppendingString:@"/Contents/Helpers/crashpad_handler"]);
RemoveQuarantineAttribute([path stringByAppendingString:@"/Contents/Frameworks/Updater"]);
}
void delFolder() {

View file

@ -927,4 +927,3 @@ fontsBoxTextStyle: TextStyle(defaultTextStyle) {
linkFont: font(13px);
linkFontOver: font(13px underline);
}

View file

@ -87,8 +87,8 @@ void PaintNarrowCounter(
const auto allowDigits = displayMentionBadge ? 1 : 3;
auto unreadRight = st::dialogsPadding.x() + (DialogListLines() == 1 ? st::dialogsUnreadHeight : st::dialogsPhotoSize);
auto unreadTop = (lines == 1
? st::dialogsPadding.y()
: st::dialogsPadding.y() + st::dialogsPhotoSize - st::dialogsUnreadHeight);
? st::dialogsPadding.y()
: st::dialogsPadding.y() + st::dialogsPhotoSize - st::dialogsUnreadHeight);
auto unreadWidth = 0;
UnreadBadgeStyle st;
@ -101,8 +101,8 @@ void PaintNarrowCounter(
auto counter = qsl("@");
auto unreadRight = st::dialogsPadding.x() + (DialogListLines() == 1 ? st::dialogsUnreadHeight : st::dialogsPhotoSize) - skipBeforeMention;
auto unreadTop = (lines == 1
? st::dialogsPadding.y()
: st::dialogsPadding.y() + st::dialogsPhotoSize - st::dialogsUnreadHeight);
? st::dialogsPadding.y()
: st::dialogsPadding.y() + st::dialogsPhotoSize - st::dialogsUnreadHeight);
auto unreadWidth = 0;
UnreadBadgeStyle st;
@ -866,10 +866,10 @@ void RowPainter::paint(
| (peer && peer->isSelf() ? Flag::SavedMessages : Flag(0));
const auto paintItemCallback = [&](int nameleft, int namewidth) {
const auto texttop = (DialogListLines() == 1
? st::dialogsPadding.y()
: st::dialogsPadding.y()
+ st::msgNameFont->height
+ st::dialogsSkip);
? st::dialogsPadding.y()
: st::dialogsPadding.y()
+ st::msgNameFont->height
+ st::dialogsSkip);
const auto availableWidth = PaintWideCounter(
p,
@ -1030,10 +1030,10 @@ void RowPainter::paint(
| (row->searchInChat().feed() ? Flag::FeedSearchResult : Flag(0))*/;
const auto paintItemCallback = [&](int nameleft, int namewidth) {
const auto texttop = (DialogListLines() == 1
? st::dialogsPadding.y()
: st::dialogsPadding.y()
+ st::msgNameFont->height
+ st::dialogsSkip);
? st::dialogsPadding.y()
: st::dialogsPadding.y()
+ st::msgNameFont->height
+ st::dialogsSkip);
const auto availableWidth = PaintWideCounter(
p,
texttop,

View file

@ -3173,7 +3173,6 @@ MsgId HistoryWidget::highlightOrigId() const {
return _highlightedOriginalMessageId;
}
void HistoryWidget::showAnimated(
Window::SlideDirection direction,
const Window::SectionSlideParams &params) {

View file

@ -113,8 +113,8 @@ QSize Gif::countOptimalSize() {
}
const auto captionWithPaddings = _caption.maxWidth()
+ st::msgPadding.left()
+ st::msgPadding.right();
+ st::msgPadding.left()
+ st::msgPadding.right();
const auto maxSize = _data->isVideoFile()
? st::maxMediaSize
: _data->isVideoMessage()
@ -173,8 +173,8 @@ QSize Gif::countCurrentSize(int newWidth) {
auto availableWidth = newWidth;
const auto captionWithPaddings = _caption.maxWidth()
+ st::msgPadding.left()
+ st::msgPadding.right();
+ st::msgPadding.left()
+ st::msgPadding.right();
const auto maxSize = _data->isVideoFile()
? st::maxMediaSize
: _data->isVideoMessage()

View file

@ -77,8 +77,8 @@ QSize GroupedMedia::countOptimalSize() {
}
const auto captionWithPaddings = _caption.maxWidth()
+ st::msgPadding.left()
+ st::msgPadding.right();
+ st::msgPadding.left()
+ st::msgPadding.right();
auto groupMaxWidth = st::historyGroupWidthMax;
if (cAdaptiveBubbles()) {
accumulate_max(groupMaxWidth, captionWithPaddings);

View file

@ -72,8 +72,8 @@ QSize Photo::countOptimalSize() {
auto minHeight = 0;
const auto captionWithPaddings = _caption.maxWidth()
+ st::msgPadding.left()
+ st::msgPadding.right();
+ st::msgPadding.left()
+ st::msgPadding.right();
auto inWebPage = (_parent->media() != this);
auto tw = style::ConvertScale(_data->width());
auto th = style::ConvertScale(_data->height());
@ -117,8 +117,8 @@ QSize Photo::countCurrentSize(int newWidth) {
auto availableWidth = newWidth;
const auto captionWithPaddings = _caption.maxWidth()
+ st::msgPadding.left()
+ st::msgPadding.right();
+ st::msgPadding.left()
+ st::msgPadding.right();
auto inWebPage = (_parent->media() != this);
auto tw = style::ConvertScale(_data->width());
auto th = style::ConvertScale(_data->height());

View file

@ -101,11 +101,13 @@ rpl::producer<TextWithEntities> UsernameValue(not_null<UserData*> user) {
}
rpl::producer<QString> PlainAboutValue(not_null<PeerData*> peer) {
/*if (const auto user = peer->asUser()) {
/*
if (const auto user = peer->asUser()) {
if (!user->isBot()) {
return rpl::single(QString());
}
}*/
}
*/
return Notify::PeerUpdateValue(
peer,
Notify::PeerUpdate::Flag::AboutChanged

View file

@ -651,8 +651,8 @@ void Instance::loadFromJson(const QString &filename) {
const auto pluralValue = keyPlurals.constFind(plural);
if (!(*pluralValue).isString()) {
LOG(("Lang Info: wrong value for key %1 in %2 in file %3, string expected"
).arg(plural).arg(key).arg(filename));
LOG(("Lang Info: wrong value for key %1 in %2 in file %3, string expected")
.arg(plural).arg(key).arg(filename));
continue;
}
@ -665,8 +665,8 @@ void Instance::loadFromJson(const QString &filename) {
}
}
} else {
LOG(("Lang Info: wrong value for key %1 in file %2, string or object expected"
).arg(key).arg(filename));
LOG(("Lang Info: wrong value for key %1 in file %2, string or object expected")
.arg(key).arg(filename));
}
if (--limit <= 0) {
break;

View file

@ -896,9 +896,11 @@ rpl::producer<QString> ProfilePhotoPrivacyController::title() {
return tr::lng_edit_privacy_profile_photo_title();
}
/*bool ProfilePhotoPrivacyController::hasOption(Option option) {
/*
bool ProfilePhotoPrivacyController::hasOption(Option option) {
return (option != Option::Nobody);
}*/
}
*/
rpl::producer<QString> ProfilePhotoPrivacyController::optionsTitleKey() {
return tr::lng_edit_privacy_profile_photo_header();

View file

@ -678,7 +678,6 @@ void FolderFiller::addTogglesForArchive() {
} // namespace
void PeerMenuHidePinnedMessage(not_null<PeerData*> peer) {
auto hidden = HistoryWidget::switchPinnedHidden(peer, true);
if (hidden) {