Commit 84141e4680

84141e4680723a50bf6ade3d184bd89844678e94

parent: 9b44c7acbc

Unsigned

siriusmart <siriusmart@tuta.io> · 2025-08-12 10:32 UTC

#96 #85

Layout: unified · split

src/items/channeldisplay.rs +2 −5
@@ -737,11 +737,8 @@ impl FrameworkItem for ChannelDisplay {
737737
738738 // clicking on rows after the last item
739739 if y > textlist.items.len() + 1 {
740 return false;
741 }
742
743 // moving the cursor
744 if y <= textlist.selected {
740 let _ = textlist.last();
741 } else if y <= textlist.selected {
745742 textlist.selected = y;
746743 } else if y >= textlist.selected + 2 {
747744 textlist.selected = y - 2;
src/items/channellist.rs +2 −6
@@ -428,15 +428,11 @@ impl FrameworkItem for ChannelList {
428428
429429 // clicking on rows after the last item
430430 if y > self.selector.items.len() + 1 {
431 return false;
431 let _ = self.selector.last();
432432 }
433
434 // moving the cursor
435433 if y <= self.selector.selected {
436434 self.selector.selected = y;
437 }
438
439 if y >= self.selector.selected + 2 {
435 } else if y >= self.selector.selected + 2 {
440436 self.selector.selected = y - 2;
441437 }
442438
src/items/itemlist.rs +3 −8
@@ -547,15 +547,10 @@ impl FrameworkItem for ItemList {
547547
548548 // clicking on rows after the last item
549549 if y > self.textlist.items.len() + 1 {
550 return self.textlist.last().is_ok();
551 }
552
553 // moving the cursor
554 if y <= self.textlist.selected {
550 let _ = self.textlist.last();
551 } else if y <= self.textlist.selected {
555552 self.textlist.selected = y;
556 }
557
558 if y >= self.textlist.selected + 2 {
553 } else if y >= self.textlist.selected + 2 {
559554 self.textlist.selected = y - 2;
560555 }
561556
src/items/searchfilters.rs +2
@@ -435,6 +435,8 @@ impl FrameworkItem for SearchFilter {
435435 } else if textlist.items.len() >= y - 1 {
436436 textlist.selected = y - 2;
437437 let _ = textlist.update();
438 } else {
439 let _ = textlist.last();
438440 }
439441
440442 if is_left_list {
src/items/singleitem.rs +3 −8
@@ -1084,15 +1084,10 @@ impl FrameworkItem for SingleItem {
10841084
10851085 // clicking on rows after the last item
10861086 if y > textlist.items.len() + 1 {
1087 return false;
1088 }
1089
1090 // moving the cursor
1091 if y <= textlist.selected {
1087 let _ = textlist.last();
1088 } else if y <= textlist.selected {
10921089 textlist.selected = y;
1093 }
1094
1095 if y >= textlist.selected + 2 {
1090 } else if y >= textlist.selected + 2 {
10961091 textlist.selected = y - 2;
10971092 }
10981093
src/items/videolist.rs +3 −8
@@ -507,15 +507,10 @@ impl FrameworkItem for VideoList {
507507
508508 // clicking on rows after the last item
509509 if y > self.selector.items.len() + 1 {
510 return false;
511 }
512
513 // moving the cursor
514 if y <= self.selector.selected {
510 let _ = self.selector.last();
511 } else if y <= self.selector.selected {
515512 self.selector.selected = y;
516 }
517
518 if y >= self.selector.selected + 2 {
513 } else if y >= self.selector.selected + 2 {
519514 self.selector.selected = y - 2;
520515 }
521516