Fix faved+recent stickers icon highlight.
This commit is contained in:
parent
362b3bc578
commit
4f1a633019
|
@ -266,16 +266,23 @@ void StickersListWidget::Footer::preloadImages() {
|
|||
void StickersListWidget::Footer::validateSelectedIcon(
|
||||
uint64 setId,
|
||||
ValidateIconAnimations animations) {
|
||||
auto newSelected = 0;
|
||||
auto favedIconIndex = -1;
|
||||
auto newSelected = -1;
|
||||
for (auto i = 0, l = _icons.size(); i != l; ++i) {
|
||||
if (_icons[i].setId == setId
|
||||
|| (_icons[i].setId == Stickers::FavedSetId
|
||||
&& setId == Stickers::RecentSetId)) {
|
||||
newSelected = i;
|
||||
break;
|
||||
} else if (_icons[i].setId == Stickers::FavedSetId) {
|
||||
favedIconIndex = i;
|
||||
}
|
||||
}
|
||||
setSelectedIcon(newSelected, animations);
|
||||
setSelectedIcon(
|
||||
(newSelected >= 0
|
||||
? newSelected
|
||||
: (favedIconIndex >= 0) ? favedIconIndex : 0),
|
||||
animations);
|
||||
}
|
||||
|
||||
void StickersListWidget::Footer::setSelectedIcon(
|
||||
|
|
|
@ -126,11 +126,11 @@ FormRequest::FormRequest(
|
|||
const QString &callbackUrl,
|
||||
const QString &publicKey,
|
||||
const QString &payload)
|
||||
: botId(botId)
|
||||
, scope(scope)
|
||||
, callbackUrl(callbackUrl)
|
||||
, publicKey(publicKey)
|
||||
, payload(payload) {
|
||||
: botId(botId)
|
||||
, scope(scope)
|
||||
, callbackUrl(callbackUrl)
|
||||
, publicKey(publicKey)
|
||||
, payload(payload) {
|
||||
}
|
||||
|
||||
EditFile::EditFile(
|
||||
|
@ -184,9 +184,9 @@ Value::Value(Type type) : type(type) {
|
|||
FormController::FormController(
|
||||
not_null<Window::Controller*> controller,
|
||||
const FormRequest &request)
|
||||
: _controller(controller)
|
||||
, _request(PreprocessRequest(request))
|
||||
, _view(std::make_unique<PanelController>(this)) {
|
||||
: _controller(controller)
|
||||
, _request(PreprocessRequest(request))
|
||||
, _view(std::make_unique<PanelController>(this)) {
|
||||
}
|
||||
|
||||
void FormController::show() {
|
||||
|
|
Loading…
Reference in New Issue