FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
tdesktop/Telegram/SourceFiles/overviewwidget.cpp at master · JavaDevl/tdesktop · GitHub
JavaDevl
/
tdesktop
Public
forked from
telegramdesktop/tdesktop
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
tdesktop
/
Telegram
/
SourceFiles
/
overviewwidget.cpp
Copy path
More file actions
More file actions
Latest commit
History
History
History
2440 lines (2179 loc) · 79.4 KB
Breadcrumbs
tdesktop
/
Telegram
/
SourceFiles
/
overviewwidget.cpp
Copy path
File metadata and controls
2440 lines (2179 loc) · 79.4 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/*
This file is part of Telegram Desktop,
the official desktop version of Telegram messaging app, see https://telegram.org
Telegram Desktop is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
It is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
In addition, as a special exception, the copyright holders give permission
to link the code of portions of this program with the OpenSSL library.
Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE
Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
*/
#
include
"
styles/style_overview.h
"
#
include
"
styles/style_dialogs.h
"
#
include
"
styles/style_window.h
"
#
include
"
styles/style_settings.h
"
#
include
"
boxes/add_contact_box.h
"
#
include
"
boxes/confirm_box.h
"
#
include
"
boxes/photo_crop_box.h
"
#
include
"
core/file_utilities.h
"
#
include
"
ui/widgets/popup_menu.h
"
#
include
"
ui/widgets/tooltip.h
"
#
include
"
ui/widgets/buttons.h
"
#
include
"
ui/widgets/input_fields.h
"
#
include
"
window/top_bar_widget.h
"
#
include
"
window/themes/window_theme.h
"
#
include
"
lang/lang_keys.h
"
#
include
"
mainwindow.h
"
#
include
"
mainwidget.h
"
#
include
"
overviewwidget.h
"
#
include
"
application.h
"
#
include
"
overview/overview_layout.h
"
#
include
"
history/history_message.h
"
#
include
"
history/history_media_types.h
"
#
include
"
history/history_service_layout.h
"
#
include
"
media/media_audio.h
"
#
include
"
observer_peer.h
"
#
include
"
auth_session.h
"
#
include
"
storage/file_download.h
"
#
include
"
ui/widgets/dropdown_menu.h
"
//
flick scroll taken from http://qt-project.org/doc/qt-4.8/demos-embedded-anomaly-src-flickcharm-cpp.html
OverviewInner::OverviewInner
(OverviewWidget *overview, Ui::ScrollArea *scroll, PeerData *peer, MediaOverviewType type) : TWidget(
nullptr
)
, _overview(overview)
, _scroll(scroll)
, _peer(peer->
migrateTo
() ? peer->migrateTo() : peer)
, _type(type)
, _reversed(_type != OverviewFiles && _type != OverviewLinks)
, _history(App::history(_peer))
, _migrated(_history->
migrateFrom
())
, _channel(peerToChannel(_peer->id))
, _rowWidth(st::msgMinWidth)
, _search(
this
, st::overviewFilter, langFactory(lng_dlg_filter))
, _cancelSearch(
this
, st::dialogsCancelSearch)
, _itemsToBeLoaded(LinksOverviewPerPage *
2
)
, _width(st::windowMinWidth) {
subscribe
(
Auth
().
downloader
().
taskFinished
(), [
this
] {
update
(); });
subscribe
(
Global::RefItemRemoved
(), [
this
](HistoryItem *item) {
itemRemoved
(item);
});
resize
(_width, st::windowMinHeight);
App::contextItem
(
0
);
_touchSelectTimer.
setSingleShot
(
true
);
connect
(&_touchSelectTimer,
SIGNAL
(
timeout
()),
this
,
SLOT
(
onTouchSelect
()));
setAttribute
(Qt::WA_AcceptTouchEvents);
connect
(&_touchScrollTimer,
SIGNAL
(
timeout
()),
this
,
SLOT
(
onTouchScrollTimer
()));
mediaOverviewUpdated
();
setMouseTracking
(
true
);
connect
(_cancelSearch,
SIGNAL
(
clicked
()),
this
,
SLOT
(
onCancelSearch
()));
connect
(_search,
SIGNAL
(
cancelled
()),
this
,
SLOT
(
onCancel
()));
connect
(_search,
SIGNAL
(
changed
()),
this
,
SLOT
(
onSearchUpdate
()));
_searchTimer.
setSingleShot
(
true
);
connect
(&_searchTimer,
SIGNAL
(
timeout
()),
this
,
SLOT
(
onSearchMessages
()));
subscribe
(
Window::Theme::Background
(), [
this
](
const
Window::Theme::BackgroundUpdate &update) {
if
(update.
paletteChanged
()) {
invalidateCache
();
}
});
subscribe
(
App::wnd
()->
dragFinished
(), [
this
] {
dragActionUpdate
(
QCursor::pos
());
});
subscribe
(
Auth
().
messageIdChanging
, [
this
](std::pair<HistoryItem*, MsgId> update) {
changingMsgId
(update.
first
, update.
second
);
});
if
(_type == OverviewLinks || _type == OverviewFiles) {
_search->
show
();
}
else
{
_search->
hide
();
}
}
void
OverviewInner::invalidateCache
() {
for_const
(
auto
item, _layoutItems) {
item->
invalidateCache
();
}
for_const
(
auto
item, _layoutDates) {
item->
invalidateCache
();
}
}
bool
OverviewInner::event
(QEvent *e) {
if
(e->
type
() == QEvent::TouchBegin || e->
type
() == QEvent::TouchUpdate || e->
type
() == QEvent::TouchEnd || e->
type
() == QEvent::TouchCancel) {
QTouchEvent *ev =
static_cast
<QTouchEvent*>(e);
if
(ev->
device
()->
type
() == QTouchDevice::TouchScreen) {
touchEvent
(ev);
return
true
;
}
}
return
QWidget::event
(e);
}
void
OverviewInner::touchUpdateSpeed
() {
const
auto
nowTime =
getms
();
if
(_touchPrevPosValid) {
const
int
elapsed = nowTime - _touchSpeedTime;
if
(elapsed) {
const
QPoint newPixelDiff = (_touchPos - _touchPrevPos);
const
QPoint pixelsPerSecond = newPixelDiff * (
1000
/ elapsed);
//
fingers are inacurates, we ignore small changes to avoid stopping the autoscroll because
//
of a small horizontal offset when scrolling vertically
const
int
newSpeedY = (
qAbs
(pixelsPerSecond.
y
()) > FingerAccuracyThreshold) ? pixelsPerSecond.
y
() :
0
;
const
int
newSpeedX = (
qAbs
(pixelsPerSecond.
x
()) > FingerAccuracyThreshold) ? pixelsPerSecond.
x
() :
0
;
if
(_touchScrollState == Ui::TouchScrollState::Auto) {
const
int
oldSpeedY = _touchSpeed.
y
();
const
int
oldSpeedX = _touchSpeed.
x
();
if
((oldSpeedY <=
0
&& newSpeedY <=
0
) || ((oldSpeedY >=
0
&& newSpeedY >=
0
)
&& (oldSpeedX <=
0
&& newSpeedX <=
0
)) || (oldSpeedX >=
0
&& newSpeedX >=
0
)) {
_touchSpeed.
setY
(
snap
((oldSpeedY + (newSpeedY /
4
)), -MaxScrollAccelerated, +MaxScrollAccelerated));
_touchSpeed.
setX
(
snap
((oldSpeedX + (newSpeedX /
4
)), -MaxScrollAccelerated, +MaxScrollAccelerated));
}
else
{
_touchSpeed =
QPoint
();
}
}
else
{
//
we average the speed to avoid strange effects with the last delta
if
(!_touchSpeed.
isNull
()) {
_touchSpeed.
setX
(
snap
((_touchSpeed.
x
() /
4
) + (newSpeedX *
3
/
4
), -MaxScrollFlick, +MaxScrollFlick));
_touchSpeed.
setY
(
snap
((_touchSpeed.
y
() /
4
) + (newSpeedY *
3
/
4
), -MaxScrollFlick, +MaxScrollFlick));
}
else
{
_touchSpeed =
QPoint
(newSpeedX, newSpeedY);
}
}
}
}
else
{
_touchPrevPosValid =
true
;
}
_touchSpeedTime = nowTime;
_touchPrevPos = _touchPos;
}
bool
OverviewInner::itemMigrated
(MsgId msgId)
const
{
return
_migrated && (msgId <
0
) && (-msgId < ServerMaxMsgId);
}
ChannelId
OverviewInner::itemChannel
(MsgId msgId)
const
{
return
itemMigrated
(msgId) ? _migrated->
channelId
() : _channel;
}
MsgId
OverviewInner::itemMsgId
(MsgId msgId)
const
{
return
itemMigrated
(msgId) ? -msgId : msgId;
}
int32
OverviewInner::migratedIndexSkip
()
const
{
return
(_migrated && _history->
overviewLoaded
(_type)) ? _migrated->
overview
(_type).
size
() :
0
;
}
void
OverviewInner::fixItemIndex
(int32 ¤t, MsgId msgId)
const
{
if
(!msgId) {
current = -
1
;
}
else
{
int32 l = _items.
size
();
if
(current <
0
|| current >= l ||
complexMsgId
(_items.
at
(current)->
getItem
()) != msgId) {
current = -
1
;
for
(int32 i =
0
; i < l; ++i) {
if
(
complexMsgId
(_items.
at
(i)->
getItem
()) == msgId) {
current = i;
break
;
}
}
}
}
}
void
OverviewInner::searchReceived
(SearchRequestType type,
const
MTPmessages_Messages &result, mtpRequestId req) {
if
(!_search->
text
().
isEmpty
()) {
if
(type == SearchFromStart) {
SearchQueries::iterator i = _searchQueries.
find
(req);
if
(i != _searchQueries.
cend
()) {
_searchCache[i.
value
()] = result;
_searchQueries.
erase
(i);
}
}
}
if
(_searchRequest == req) {
const
QVector<MTPMessage> *messages =
nullptr
;
switch
(result.
type
()) {
case
mtpc_messages_messages: {
auto
&d = result.
c_messages_messages
();
App::feedUsers
(d.
vusers
);
App::feedChats
(d.
vchats
);
messages = &d.
vmessages
.
v
;
_searchedCount = messages->
size
();
}
break
;
case
mtpc_messages_messagesSlice: {
auto
&d = result.
c_messages_messagesSlice
();
App::feedUsers
(d.
vusers
);
App::feedChats
(d.
vchats
);
messages = &d.
vmessages
.
v
;
_searchedCount = d.
vcount
.
v
;
}
break
;
case
mtpc_messages_channelMessages: {
auto
&d = result.
c_messages_channelMessages
();
if
(_peer && _peer->
isChannel
()) {
_peer->
asChannel
()->
ptsReceived
(d.
vpts
.
v
);
}
else
{
LOG
((
"
API Error: received messages.channelMessages when no channel was passed! (OverviewInner::searchReceived)
"
));
}
App::feedUsers
(d.
vusers
);
App::feedChats
(d.
vchats
);
messages = &d.
vmessages
.
v
;
_searchedCount = d.
vcount
.
v
;
}
break
;
}
if
(messages) {
bool
migratedSearch = (type == SearchMigratedFromStart || type == SearchMigratedFromOffset);
if
(messages->
isEmpty
()) {
if
(migratedSearch) {
_searchFullMigrated =
true
;
}
else
{
_searchFull =
true
;
}
}
if
(type == SearchFromStart) {
_searchResults.
clear
();
_lastSearchId = _lastSearchMigratedId =
0
;
_itemsToBeLoaded = LinksOverviewPerPage *
2
;
}
if
(type == SearchMigratedFromStart) {
_lastSearchMigratedId =
0
;
}
for
(
auto
i = messages->
cbegin
(), e = messages->
cend
(); i != e; ++i) {
auto
item =
App::histories
().
addNewMessage
(*i, NewMessageExisting);
auto
msgId = item ? item->
id
:
idFromMessage
(*i);
if
(migratedSearch) {
if
(item) _searchResults.
push_front
(-item->
id
);
_lastSearchMigratedId = msgId;
}
else
{
if
(item) _searchResults.
push_front
(item->
id
);
_lastSearchId = msgId;
}
}
mediaOverviewUpdated
();
if
(messages->
isEmpty
()) {
update
();
}
}
_searchRequest =
0
;
_overview->
onScroll
();
}
}
bool
OverviewInner::searchFailed
(SearchRequestType type,
const
RPCError &error, mtpRequestId req) {
if
(
MTP::isDefaultHandledError
(error))
return
false
;
if
(_searchRequest == req) {
_searchRequest =
0
;
if
(type == SearchFromStart || type == SearchFromOffset) {
_searchFull =
true
;
}
else
if
(type == SearchMigratedFromStart || type == SearchMigratedFromOffset) {
_searchFullMigrated =
true
;
}
}
return
true
;
}
bool
OverviewInner::itemHasPoint
(MsgId msgId, int32 index, int32 x, int32 y)
const
{
fixItemIndex
(index, msgId);
if
(index <
0
)
return
false
;
if
(_type == OverviewPhotos || _type == OverviewVideos) {
if
(x >=
0
&& x < _rowWidth && y >=
0
&& y < _rowWidth) {
return
true
;
}
}
else
{
if
(x >= _rowsLeft && x < _rowsLeft + _rowWidth && y >=
0
&& y <
itemHeight
(msgId, index)) {
return
true
;
}
}
return
false
;
}
int32
OverviewInner::itemHeight
(MsgId msgId, int32 index)
const
{
if
(_type == OverviewPhotos || _type == OverviewVideos) {
return
_rowWidth;
}
fixItemIndex
(index, msgId);
return
(index <
0
) ?
0
: _items.
at
(index)->
height
();
}
void
OverviewInner::moveToNextItem
(MsgId &msgId, int32 &index, MsgId upTo, int32 delta)
const
{
fixItemIndex
(index, msgId);
if
(msgId == upTo || index <
0
) {
msgId =
0
;
index = -
1
;
return
;
}
index += delta;
while
(index >=
0
&& index < _items.
size
() && !_items.
at
(index)->
toMediaItem
()) {
index += (delta >
0
) ?
1
: -
1
;
}
if
(index <
0
|| index >= _items.
size
()) {
msgId =
0
;
index = -
1
;
}
else
{
msgId =
complexMsgId
(_items.
at
(index)->
getItem
());
}
}
void
OverviewInner::repaintItem
(MsgId itemId, int32 itemIndex) {
fixItemIndex
(itemIndex, itemId);
if
(itemIndex >=
0
) {
if
(_type == OverviewPhotos || _type == OverviewVideos) {
float64 w = (
float64
(_width - st::overviewPhotoSkip) / _photosInRow);
int32 vsize = (_rowWidth + st::overviewPhotoSkip);
int32 row = itemIndex / _photosInRow, col = itemIndex % _photosInRow;
update
(
int32
(col * w), _marginTop +
int32
(row * vsize),
qCeil
(w), vsize);
}
else
{
int32 top = _items.
at
(itemIndex)->
Get
<Overview::Layout::Info>()->
top
;
if
(_reversed) top = _height - top;
update
(_rowsLeft, _marginTop + top, _rowWidth, _items.
at
(itemIndex)->
height
());
}
}
}
void
OverviewInner::touchResetSpeed
() {
_touchSpeed =
QPoint
();
_touchPrevPosValid =
false
;
}
void
OverviewInner::touchDeaccelerate
(int32 elapsed) {
int32 x = _touchSpeed.
x
();
int32 y = _touchSpeed.
y
();
_touchSpeed.
setX
((x ==
0
) ? x : (x >
0
) ?
qMax
(
0
, x - elapsed) :
qMin
(
0
, x + elapsed));
_touchSpeed.
setY
((y ==
0
) ? y : (y >
0
) ?
qMax
(
0
, y - elapsed) :
qMin
(
0
, y + elapsed));
}
void
OverviewInner::touchEvent
(QTouchEvent *e) {
const
Qt::TouchPointStates &
states
(e->
touchPointStates
());
if
(e->
type
() == QEvent::TouchCancel) {
//
cancel
if
(!_touchInProgress)
return
;
_touchInProgress =
false
;
_touchSelectTimer.
stop
();
_touchScroll = _touchSelect =
false
;
_touchScrollState = Ui::TouchScrollState::Manual;
dragActionCancel
();
return
;
}
if
(!e->
touchPoints
().
isEmpty
()) {
_touchPrevPos = _touchPos;
_touchPos = e->
touchPoints
().
cbegin
()->
screenPos
().
toPoint
();
}
switch
(e->
type
()) {
case
QEvent::TouchBegin:
if
(_touchInProgress)
return
;
if
(e->
touchPoints
().
isEmpty
())
return
;
_touchInProgress =
true
;
if
(_touchScrollState == Ui::TouchScrollState::Auto) {
_touchScrollState = Ui::TouchScrollState::Acceleration;
_touchWaitingAcceleration =
true
;
_touchAccelerationTime =
getms
();
touchUpdateSpeed
();
_touchStart = _touchPos;
}
else
{
_touchScroll =
false
;
_touchSelectTimer.
start
(
QApplication::startDragTime
());
}
_touchSelect =
false
;
_touchStart = _touchPrevPos = _touchPos;
break
;
case
QEvent::TouchUpdate:
if
(!_touchInProgress)
return
;
if
(_touchSelect) {
dragActionUpdate
(_touchPos);
}
else
if
(!_touchScroll && (_touchPos - _touchStart).
manhattanLength
() >=
QApplication::startDragDistance
()) {
_touchSelectTimer.
stop
();
_touchScroll =
true
;
touchUpdateSpeed
();
}
if
(_touchScroll) {
if
(_touchScrollState == Ui::TouchScrollState::Manual) {
touchScrollUpdated
(_touchPos);
}
else
if
(_touchScrollState == Ui::TouchScrollState::Acceleration) {
touchUpdateSpeed
();
_touchAccelerationTime =
getms
();
if
(_touchSpeed.
isNull
()) {
_touchScrollState = Ui::TouchScrollState::Manual;
}
}
}
break
;
case
QEvent::TouchEnd:
if
(!_touchInProgress)
return
;
_touchInProgress =
false
;
if
(_touchSelect) {
dragActionFinish
(_touchPos, Qt::RightButton);
QContextMenuEvent
contextMenu
(QContextMenuEvent::Mouse,
mapFromGlobal
(_touchPos), _touchPos);
showContextMenu
(&contextMenu,
true
);
_touchScroll =
false
;
}
else
if
(_touchScroll) {
if
(_touchScrollState == Ui::TouchScrollState::Manual) {
_touchScrollState = Ui::TouchScrollState::Auto;
_touchPrevPosValid =
false
;
_touchScrollTimer.
start
(
15
);
_touchTime =
getms
();
}
else
if
(_touchScrollState == Ui::TouchScrollState::Auto) {
_touchScrollState = Ui::TouchScrollState::Manual;
_touchScroll =
false
;
touchResetSpeed
();
}
else
if
(_touchScrollState == Ui::TouchScrollState::Acceleration) {
_touchScrollState = Ui::TouchScrollState::Auto;
_touchWaitingAcceleration =
false
;
_touchPrevPosValid =
false
;
}
}
else
{
//
one short tap -- like mouse click
dragActionStart
(_touchPos);
dragActionFinish
(_touchPos);
}
_touchSelectTimer.
stop
();
_touchSelect =
false
;
break
;
}
}
void
OverviewInner::dragActionUpdate
(
const
QPoint &screenPos) {
_dragPos = screenPos;
onUpdateSelected
();
}
void
OverviewInner::dragActionStart
(
const
QPoint &screenPos, Qt::MouseButton button) {
dragActionUpdate
(screenPos);
if
(button != Qt::LeftButton)
return
;
ClickHandler::pressed
();
_dragAction = NoDrag;
_dragItem = _mousedItem;
_dragItemIndex = _mousedItemIndex;
_dragStartPos =
mapMouseToItem
(
mapFromGlobal
(screenPos), _dragItem, _dragItemIndex);
_dragWasInactive =
App::wnd
()->
wasInactivePress
();
if
(_dragWasInactive)
App::wnd
()->
setInactivePress
(
false
);
if
(
ClickHandler::getPressed
() && _selected.
isEmpty
()) {
_dragAction = PrepareDrag;
}
else
if
(!_selected.
isEmpty
()) {
if
(_selected.
cbegin
().
value
() == FullSelection) {
if
(_selected.
constFind
(_dragItem) != _selected.
cend
() &&
ClickHandler::getPressed
()) {
_dragAction = PrepareDrag;
//
start items drag
}
else
{
_dragAction = PrepareSelect;
//
start items select
}
}
}
if
(_dragAction == NoDrag && _dragItem) {
if
(!_dragWasInactive) {
_dragAction = PrepareSelect;
}
}
if
(!_dragItem) {
_dragAction = NoDrag;
}
else
if
(_dragAction == NoDrag) {
_dragItem =
0
;
}
}
void
OverviewInner::dragActionCancel
() {
_dragItem =
0
;
_dragItemIndex = -
1
;
_dragAction = NoDrag;
_dragSelFrom = _dragSelTo =
0
;
_dragSelFromIndex = _dragSelToIndex = -
1
;
_dragStartPos =
QPoint
(
0
,
0
);
_overview->
noSelectingScroll
();
}
void
OverviewInner::dragActionFinish
(
const
QPoint &screenPos, Qt::MouseButton button) {
dragActionUpdate
(screenPos);
ClickHandlerPtr activated =
ClickHandler::unpressed
();
if
(_dragAction == Dragging || _selMode) {
activated.
clear
();
}
if
(!
ClickHandler::getActive
() && _cursor != style::cur_default) {
_cursor = style::cur_default;
setCursor
(_cursor);
}
if
(activated) {
dragActionCancel
();
App::activateClickHandler
(activated, button);
return
;
}
if
(_dragAction == PrepareSelect && !_dragWasInactive && !_selected.
isEmpty
() && _selected.
cbegin
().
value
() == FullSelection) {
SelectedItems::iterator i = _selected.
find
(_dragItem);
if
(i == _selected.
cend
() &&
itemMsgId
(_dragItem) >
0
) {
if
(_selected.
size
() < MaxSelectedItems) {
if
(!_selected.
isEmpty
() && _selected.
cbegin
().
value
() != FullSelection) {
_selected.
clear
();
}
_selected.
insert
(_dragItem, FullSelection);
}
}
else
{
_selected.
erase
(i);
}
repaintItem
(_dragItem, _dragItemIndex);
}
else
if
(_dragAction == PrepareDrag && !_dragWasInactive && button != Qt::RightButton) {
SelectedItems::iterator i = _selected.
find
(_dragItem);
if
(i != _selected.
cend
() && i.
value
() == FullSelection) {
_selected.
erase
(i);
repaintItem
(_dragItem, _dragItemIndex);
}
else
if
(i == _selected.
cend
() &&
itemMsgId
(_dragItem) >
0
&& !_selected.
isEmpty
() && _selected.
cbegin
().
value
() == FullSelection) {
if
(_selected.
size
() < MaxSelectedItems) {
_selected.
insert
(_dragItem, FullSelection);
repaintItem
(_dragItem, _dragItemIndex);
}
}
else
{
_selected.
clear
();
update
();
}
}
else
if
(_dragAction == Selecting) {
if
(_dragSelFrom && _dragSelTo) {
applyDragSelection
();
}
else
if
(!_selected.
isEmpty
() && !_dragWasInactive) {
auto
sel = _selected.
cbegin
().
value
();
if
(sel != FullSelection && sel.
from
== sel.
to
) {
_selected.
clear
();
App::wnd
()->
setInnerFocus
();
}
}
}
_dragAction = NoDrag;
_overview->
noSelectingScroll
();
_overview->
updateTopBarSelection
();
}
void
OverviewInner::performDrag
() {
if
(_dragAction != Dragging)
return
;
bool
uponSelected =
false
;
if
(_dragItem) {
if
(!_selected.
isEmpty
() && _selected.
cbegin
().
value
() == FullSelection) {
uponSelected = _selected.
contains
(_dragItem);
}
else
{
uponSelected =
false
;
}
}
ClickHandlerPtr pressedHandler =
ClickHandler::getPressed
();
QString sel;
QList<QUrl> urls;
bool
forwardSelected =
false
;
if
(uponSelected) {
if
(!
Adaptive::OneColumn
()) {
auto
selectedState =
getSelectionState
();
if
(selectedState.
count
>
0
&& selectedState.
count
== selectedState.
canForwardCount
) {
forwardSelected =
true
;
}
}
}
else
if
(pressedHandler) {
sel = pressedHandler->
dragText
();
//
if (!sel.isEmpty() && sel.at(0) != '/' && sel.at(0) != '@' && sel.at(0) != '#') {
//
urls.push_back(QUrl::fromEncoded(sel.toUtf8())); // Google Chrome crashes in Mac OS X O_o
//
}
}
if
(!sel.
isEmpty
() || forwardSelected) {
updateDragSelection
(
0
, -
1
,
0
, -
1
,
false
);
_overview->
noSelectingScroll
();
auto
mimeData = std::make_unique<QMimeData>();
if
(!sel.
isEmpty
()) mimeData->
setText
(sel);
if
(!urls.
isEmpty
()) mimeData->
setUrls
(urls);
if
(forwardSelected) {
mimeData->
setData
(
qsl
(
"
application/x-td-forward-selected
"
),
"
1
"
);
}
//
This call enters event loop and can destroy any QObject.
App::wnd
()->
launchDrag
(
std::move
(mimeData));
return
;
}
else
{
QString forwardMimeType;
HistoryMedia *pressedMedia =
nullptr
;
if
(
auto
pressedLnkItem =
App::pressedLinkItem
()) {
if
((pressedMedia = pressedLnkItem->
getMedia
())) {
if
(forwardMimeType.
isEmpty
() && pressedMedia->
dragItemByHandler
(pressedHandler)) {
forwardMimeType =
qsl
(
"
application/x-td-forward-pressed-link
"
);
}
}
}
if
(!forwardMimeType.
isEmpty
()) {
auto
mimeData = std::make_unique<QMimeData>();
mimeData->
setData
(
qsl
(
"
application/x-td-forward-pressed-link
"
),
"
1
"
);
if
(
auto
document = (pressedMedia ? pressedMedia->
getDocument
() :
nullptr
)) {
auto
filepath = document->
filepath
(DocumentData::FilePathResolveChecked);
if
(!filepath.
isEmpty
()) {
QList<QUrl> urls;
urls.
push_back
(
QUrl::fromLocalFile
(filepath));
mimeData->
setUrls
(urls);
}
}
//
This call enters event loop and can destroy any QObject.
App::wnd
()->
launchDrag
(
std::move
(mimeData));
return
;
}
}
}
void
OverviewInner::touchScrollUpdated
(
const
QPoint &screenPos) {
_touchPos = screenPos;
_overview->
touchScroll
(_touchPos - _touchPrevPos);
touchUpdateSpeed
();
}
void
OverviewInner::addSelectionRange
(int32 selFrom, int32 selTo, History *history) {
if
(selFrom <
0
|| selTo <
0
)
return
;
for
(int32 i = selFrom; i <= selTo; ++i) {
MsgId msgid =
complexMsgId
(_items.
at
(i)->
getItem
());
if
(!msgid)
continue
;
SelectedItems::iterator j = _selected.
find
(msgid);
if
(_dragSelecting &&
itemMsgId
(msgid) >
0
) {
if
(j == _selected.
cend
()) {
if
(_selected.
size
() >= MaxSelectedItems)
break
;
_selected.
insert
(msgid, FullSelection);
}
else
if
(j.
value
() != FullSelection) {
*j = FullSelection;
}
}
else
{
if
(j != _selected.
cend
()) {
_selected.
erase
(j);
}
}
}
}
void
OverviewInner::applyDragSelection
() {
if
(_dragSelFromIndex <
0
|| _dragSelToIndex <
0
)
return
;
if
(!_selected.
isEmpty
() && _selected.
cbegin
().
value
() != FullSelection) {
_selected.
clear
();
}
addSelectionRange
(_dragSelToIndex, _dragSelFromIndex, _history);
_dragSelFrom = _dragSelTo =
0
;
_dragSelFromIndex = _dragSelToIndex = -
1
;
_overview->
updateTopBarSelection
();
}
QPoint
OverviewInner::mapMouseToItem
(QPoint p, MsgId itemId, int32 itemIndex) {
fixItemIndex
(itemIndex, itemId);
if
(itemIndex <
0
)
return
QPoint
(
0
,
0
);
if
(_type == OverviewPhotos || _type == OverviewVideos) {
int32 row = itemIndex / _photosInRow, col = itemIndex % _photosInRow;
float64 w = (_width - st::overviewPhotoSkip) /
float64
(_photosInRow);
p.
setX
(p.
x
() -
int32
(col * w) - st::overviewPhotoSkip);
p.
setY
(p.
y
() - _marginTop - row * (_rowWidth + st::overviewPhotoSkip) - st::overviewPhotoSkip);
}
else
{
int32 top = _items.
at
(itemIndex)->
Get
<Overview::Layout::Info>()->
top
;
if
(_reversed) top = _height - top;
p.
setY
(p.
y
() - _marginTop - top);
}
return
p;
}
void
OverviewInner::activate
() {
if
(_type == OverviewLinks || _type == OverviewFiles) {
_search->
setFocus
();
}
else
{
setFocus
();
}
}
void
OverviewInner::clear
() {
_selected.
clear
();
_dragItemIndex = _mousedItemIndex = _dragSelFromIndex = _dragSelToIndex = -
1
;
_dragItem = _mousedItem = _dragSelFrom = _dragSelTo =
0
;
_dragAction = NoDrag;
for
(LayoutItems::const_iterator i = _layoutItems.
cbegin
(), e = _layoutItems.
cend
(); i != e; ++i) {
delete
i.
value
();
}
_layoutItems.
clear
();
for
(LayoutDates::const_iterator i = _layoutDates.
cbegin
(), e = _layoutDates.
cend
(); i != e; ++i) {
delete
i.
value
();
}
_layoutDates.
clear
();
_items.
clear
();
App::clearMousedItems
();
}
int32
OverviewInner::itemTop
(
const
FullMsgId &msgId)
const
{
if
(_type == OverviewMusicFiles) {
int32 itemIndex = -
1
;
fixItemIndex
(itemIndex, (msgId.
channel
== _channel) ? msgId.
msg
: ((_migrated && msgId.
channel
== _migrated->
channelId
()) ? -msgId.
msg
:
0
));
if
(itemIndex >=
0
) {
int32 top = _items.
at
(itemIndex)->
Get
<Overview::Layout::Info>()->
top
;
if
(_reversed) top = _height - top;
return
_marginTop + top;
}
}
return
-
1
;
}
void
OverviewInner::preloadMore
() {
if
(_inSearch) {
if
(!_searchRequest) {
auto
filter = (_type == OverviewLinks) ?
MTP_inputMessagesFilterUrl
() :
MTP_inputMessagesFilterDocument
();
if
(!_searchFull) {
_searchRequest =
MTP::send
(
MTPmessages_Search
(
MTP_flags
(
0
), _history->
peer
->
input
,
MTP_string
(_searchQuery),
MTP_inputUserEmpty
(), filter,
MTP_int
(
0
),
MTP_int
(
0
),
MTP_int
(_lastSearchId),
MTP_int
(
0
),
MTP_int
(SearchPerPage),
MTP_int
(
0
),
MTP_int
(
0
)),
rpcDone
(&OverviewInner::searchReceived, _lastSearchId ? SearchFromOffset : SearchFromStart),
rpcFail
(&OverviewInner::searchFailed, _lastSearchId ? SearchFromOffset : SearchFromStart));
if
(!_lastSearchId) {
_searchQueries.
insert
(_searchRequest, _searchQuery);
}
}
else
if
(_migrated && !_searchFullMigrated) {
_searchRequest =
MTP::send
(
MTPmessages_Search
(
MTP_flags
(
0
), _migrated->
peer
->
input
,
MTP_string
(_searchQuery),
MTP_inputUserEmpty
(), filter,
MTP_int
(
0
),
MTP_int
(
0
),
MTP_int
(_lastSearchMigratedId),
MTP_int
(
0
),
MTP_int
(SearchPerPage),
MTP_int
(
0
),
MTP_int
(
0
)),
rpcDone
(&OverviewInner::searchReceived, _lastSearchMigratedId ? SearchMigratedFromOffset : SearchMigratedFromStart),
rpcFail
(&OverviewInner::searchFailed, _lastSearchMigratedId ? SearchMigratedFromOffset : SearchMigratedFromStart));
}
}
}
else
if
(
App::main
()) {
if
(_migrated && _history->
overviewLoaded
(_type)) {
App::main
()->
loadMediaBack
(_migrated->
peer
, _type,
true
);
}
else
{
App::main
()->
loadMediaBack
(_history->
peer
, _type,
true
);
}
}
}
bool
OverviewInner::preloadLocal
() {
if
(_itemsToBeLoaded >=
migratedIndexSkip
() + _history->
overview
(_type).
size
())
return
false
;
_itemsToBeLoaded += LinksOverviewPerPage;
mediaOverviewUpdated
();
return
true
;
}
TextSelection
OverviewInner::itemSelectedValue
(int32 index)
const
{
int32 selfrom = -
1
, selto = -
1
;
if
(_dragSelFromIndex >=
0
&& _dragSelToIndex >=
0
) {
selfrom = _dragSelToIndex;
selto = _dragSelFromIndex;
}
if
(_items.
at
(index)->
toMediaItem
()) {
//
draw item
if
(index >= _dragSelToIndex && index <= _dragSelFromIndex && _dragSelToIndex >=
0
) {
return
(_dragSelecting && _items.
at
(index)->
msgId
() >
0
) ? FullSelection : TextSelection{
0
,
0
};
}
else
if
(!_selected.
isEmpty
()) {
SelectedItems::const_iterator j = _selected.
constFind
(
complexMsgId
(_items.
at
(index)->
getItem
()));
if
(j != _selected.
cend
()) {
return
j.
value
();
}
}
}
return
{
0
,
0
};
}
void
OverviewInner::paintEvent
(QPaintEvent *e) {
if
(
App::wnd
() &&
App::wnd
()->
contentOverlapped
(
this
, e))
return
;
Painter
p
(
this
);
QRect
r
(e->
rect
());
bool
trivial = (r ==
rect
());
if
(!trivial) {
p.
setClipRect
(r);
}
auto
ms =
getms
();
Overview::Layout::PaintContext
context
(ms, _selMode);
if
(_history->
overview
(_type).
isEmpty
() && (!_migrated || !_history->
overviewLoaded
(_type) || _migrated->
overview
(_type).
isEmpty
())) {
HistoryLayout::paintEmpty
(p, _width,
height
());
return
;
}
else
if
(_inSearch && _searchResults.
isEmpty
() && _searchFull && (!_migrated || _searchFullMigrated) && !_searchTimer.
isActive
()) {
p.
setFont
(st::noContactsFont->
f
);
p.
setPen
(st::noContactsColor->
p
);
p.
drawText
(
QRect
(_rowsLeft, _marginTop, _rowWidth, _marginTop),
lang
(lng_search_no_results), style::al_center);
return
;
}
int32 selfrom = -
1
, selto = -
1
;
if
(_dragSelFromIndex >=
0
&& _dragSelToIndex >=
0
) {
selfrom = _dragSelToIndex;
selto = _dragSelFromIndex;
}
SelectedItems::const_iterator selEnd = _selected.
cend
();
bool
hasSel = !_selected.
isEmpty
();
if
(_type == OverviewPhotos || _type == OverviewVideos) {
int32 count = _items.
size
(), rowsCount = count / _photosInRow + ((count % _photosInRow) ?
1
:
0
);
int32 rowFrom =
floorclamp
(r.
y
() - _marginTop - st::overviewPhotoSkip, _rowWidth + st::overviewPhotoSkip,
0
, rowsCount);
int32 rowTo =
ceilclamp
(r.
y
() + r.
height
() - _marginTop - st::overviewPhotoSkip, _rowWidth + st::overviewPhotoSkip,
0
, rowsCount);
float64 w =
float64
(_width - st::overviewPhotoSkip) / _photosInRow;
for
(int32 row = rowFrom; row < rowTo; ++row) {
if
(row * _photosInRow >= count)
break
;
for
(int32 col =
0
; col < _photosInRow; ++col) {
int32 i = row * _photosInRow + col;
if
(i <
0
)
continue
;
if
(i >= count)
break
;
QPoint
pos
(
int32
(col * w + st::overviewPhotoSkip), _marginTop + row * (_rowWidth + st::overviewPhotoSkip) + st::overviewPhotoSkip);
p.
translate
(pos.
x
(), pos.
y
());
_items.
at
(i)->
paint
(p, r.
translated
(-pos.
x
(), -pos.
y
()),
itemSelectedValue
(i), &context);
p.
translate
(-pos.
x
(), -pos.
y
());
}
}
}
else
{
p.
translate
(_rowsLeft, _marginTop);
int32 y =
0
, w = _rowWidth;
for
(int32 j =
0
, l = _items.
size
(); j < l; ++j) {
int32 i = _reversed ? (l - j -
1
) : j, nexti = _reversed ? (i -
1
) : (i +
1
);
int32 nextItemTop = (j +
1
== l) ? (_reversed ?
0
: _height) : _items.
at
(nexti)->
Get
<Overview::Layout::Info>()->
top
;
if
(_reversed) nextItemTop = _height - nextItemTop;
if
(_marginTop + nextItemTop > r.
top
()) {
auto
info = _items.
at
(i)->
Get
<Overview::Layout::Info>();
int32 curY = info->
top
;
if
(_reversed) curY = _height - curY;
if
(_marginTop + curY >= r.
y
() + r.
height
())
break
;
context.
isAfterDate
= (j >
0
) ? !_items.
at
(j -
1
)->
toMediaItem
() :
false
;
p.
translate
(
0
, curY - y);
_items.
at
(i)->
paint
(p, r.
translated
(-_rowsLeft, -_marginTop - curY),
itemSelectedValue
(i), &context);
y = curY;
}
}
}
}
void
OverviewInner::mouseMoveEvent
(QMouseEvent *e) {
if
(!(e->
buttons
() & (Qt::LeftButton | Qt::MiddleButton)) && _dragAction != NoDrag) {
mouseReleaseEvent
(e);
}
dragActionUpdate
(e->
globalPos
());
}
void
OverviewInner::onUpdateSelected
() {
if
(
isHidden
())
return
;
QPoint
mousePos
(
mapFromGlobal
(_dragPos));
QPoint
m
(_overview->
clampMousePosition
(mousePos));
ClickHandlerPtr lnk;
ClickHandlerHost *lnkhost =
nullptr
;
HistoryItem *item =
0
;
int32 index = -
1
;
int32 newsel =
0
;
HistoryCursorState cursorState = HistoryDefaultCursorState;
if
(_type == OverviewPhotos || _type == OverviewVideos) {
float64 w = (
float64
(_width - st::overviewPhotoSkip) / _photosInRow);
int32 col =
int32
((m.
x
() - (st::overviewPhotoSkip /
2
)) / w), vsize = (_rowWidth + st::overviewPhotoSkip);
int32 row =
int32
((m.
y
() - _marginTop - (st::overviewPhotoSkip /
2
)) / vsize);
if
(col <
0
) col =
0
;
if
(row <
0
) row =
0
;
bool
upon =
true
;
int32 count = _items.
size
(), i = row * _photosInRow + col;
if
(i <
0
) {
i =
0
;
upon =
false
;
}
if
(i >= count) {
i = count -
1
;
upon =
false
;
}
if
(i >=
0
) {
if
(
auto
media = _items.
at
(i)->
toMediaItem
()) {
item = media->
getItem
();
index = i;
if
(upon) {
media->
getState
(lnk, cursorState, m -
QPoint
(col * w + st::overviewPhotoSkip, _marginTop + row * vsize + st::overviewPhotoSkip));
lnkhost = media;
}
}
}
}
else
{
for
(int32 j =
0
, l = _items.
size
(); j < l; ++j) {
bool
lastItem = (j +
1
== l);
int32 i = _reversed ? (l - j -
1
) : j, nexti = _reversed ? (i -
1
) : (i +
1
);
int32 nextItemTop = lastItem ? (_reversed ?
0
: _height) : _items.
at
(nexti)->
Get
<Overview::Layout::Info>()->
top
;
if
(_reversed) nextItemTop = _height - nextItemTop;
if
(_marginTop + nextItemTop > m.
y
() || lastItem) {
int32 top = _items.
at
(i)->
Get
<Overview::Layout::Info>()->
top
;
if
(_reversed) top = _height - top;
if
(!_items.
at
(i)->
toMediaItem
()) {
//
day item
int32 h = _items.
at
(i)->
height
();
bool
beforeItem = (_marginTop + top + h /
2
) >= m.
y
();
if
(_reversed) beforeItem = !beforeItem;
if
(i >
0
&& (beforeItem || i == _items.
size
() -
1
)) {
--i;
if
(!_items.
at
(i)->
toMediaItem
())
break
;
//
wtf
top = _items.
at
(i)->
Get
<Overview::Layout::Info>()->
top
;
}
else
if
(i < _items.
size
() -
1
&& (!beforeItem || !i)) {
++i;
if
(!_items.
at
(i)->
toMediaItem
())
break
;
//
wtf
top = _items.
at
(i)->
Get
<Overview::Layout::Info>()->
top
;
}
else
{
break
;
//
wtf
}
if
(_reversed) top = _height - top;
j = _reversed ? (l - i -
1
) : i;
}
if
(
auto
media = _items.
at
(i)->
toMediaItem
()) {
item = media->
getItem
();
index = i;
media->
getState
(lnk, cursorState, m -
QPoint
(_rowsLeft, _marginTop + top));
lnkhost = media;
}
break
;
}
}
}
MsgId oldMousedItem = _mousedItem;
int32 oldMousedItemIndex = _mousedItemIndex;
_mousedItem = item ? ((item->
history
() == _migrated) ? -item->
id
: item->
id
) :
0
;
_mousedItemIndex = index;
m =
mapMouseToItem
(m, _mousedItem, _mousedItemIndex);
Qt::CursorShape cur = style::cur_default;
bool
lnkChanged =
ClickHandler::setActive
(lnk, lnkhost);
if
(lnkChanged) {
Ui::Tooltip::Hide
();
}
App::mousedItem
(item);
if
(_mousedItem != oldMousedItem) {
Ui::Tooltip::Hide
();
if
(oldMousedItem)
repaintItem
(oldMousedItem, oldMousedItemIndex);
if
(item)
repaintItem
(item);
}
if
(_cursorState == HistoryInDateCursorState && cursorState != HistoryInDateCursorState) {
Ui::Tooltip::Hide
();
}
if
(cursorState != _cursorState) {
_cursorState = cursorState;
}
if
(lnk || cursorState == HistoryInDateCursorState) {
Ui::Tooltip::Show
(
1000
,
this
);
}
fixItemIndex
(_dragItemIndex, _dragItem);
fixItemIndex
(_mousedItemIndex, _mousedItem);
if
(_dragAction == NoDrag) {
if
(lnk) {
cur = style::cur_pointer;
}
}
else
{
if
(_dragItemIndex <
0
|| _mousedItemIndex <
0
) {
_dragAction = NoDrag;
return
;
}
if
(_mousedItem != _dragItem || (m - _dragStartPos).
manhattanLength
() >=
QApplication::startDragDistance
()) {
if
(_dragAction == PrepareDrag) {
_dragAction = Dragging;
InvokeQueued
(
this
, [
this
] {
performDrag
(); });
}
else
if
(_dragAction == PrepareSelect) {
_dragAction = Selecting;
}
}
if
(_dragAction == Selecting) {
bool
canSelectMany = (_peer !=
0
);
if
(_mousedItem == _dragItem && lnk && !_selected.
isEmpty
() && _selected.
cbegin
().
value
() != FullSelection) {
bool
afterSymbol =
false
, uponSymbol =
false
;
uint16 second =
0
;
_selected[_dragItem] = {
0
,
0
};
updateDragSelection
(
0
, -
1
,
0
, -
1
,
false
);
}
else
if
(canSelectMany) {
View remainder of file in raw view
Back
|
FazBrowse Home
|
New Git URL