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 {
737 737
738 // clicking on rows after the last item 738 // clicking on rows after the last item
739 if y > textlist.items.len() + 1 { 739 if y > textlist.items.len() + 1 {
740 return false; 740 let _ = textlist.last();
741 } 741 } else if y <= textlist.selected {
742
743 // moving the cursor
744 if y <= textlist.selected {
745 textlist.selected = y; 742 textlist.selected = y;
746 } else if y >= textlist.selected + 2 { 743 } else if y >= textlist.selected + 2 {
747 textlist.selected = y - 2; 744 textlist.selected = y - 2;
src/items/channellist.rs +2 −6
@@ -428,15 +428,11 @@ impl FrameworkItem for ChannelList {
428 428
429 // clicking on rows after the last item 429 // clicking on rows after the last item
430 if y > self.selector.items.len() + 1 { 430 if y > self.selector.items.len() + 1 {
431 return false; 431 let _ = self.selector.last();
432 } 432 }
433
434 // moving the cursor
435 if y <= self.selector.selected { 433 if y <= self.selector.selected {
436 self.selector.selected = y; 434 self.selector.selected = y;
437 } 435 } else if y >= self.selector.selected + 2 {
438
439 if y >= self.selector.selected + 2 {
440 self.selector.selected = y - 2; 436 self.selector.selected = y - 2;
441 } 437 }
442 438
src/items/itemlist.rs +3 −8
@@ -547,15 +547,10 @@ impl FrameworkItem for ItemList {
547 547
548 // clicking on rows after the last item 548 // clicking on rows after the last item
549 if y > self.textlist.items.len() + 1 { 549 if y > self.textlist.items.len() + 1 {
550 return self.textlist.last().is_ok(); 550 let _ = self.textlist.last();
551 } 551 } else if y <= self.textlist.selected {
552
553 // moving the cursor
554 if y <= self.textlist.selected {
555 self.textlist.selected = y; 552 self.textlist.selected = y;
556 } 553 } else if y >= self.textlist.selected + 2 {
557
558 if y >= self.textlist.selected + 2 {
559 self.textlist.selected = y - 2; 554 self.textlist.selected = y - 2;
560 } 555 }
561 556
src/items/searchfilters.rs +2
@@ -435,6 +435,8 @@ impl FrameworkItem for SearchFilter {
435 } else if textlist.items.len() >= y - 1 { 435 } else if textlist.items.len() >= y - 1 {
436 textlist.selected = y - 2; 436 textlist.selected = y - 2;
437 let _ = textlist.update(); 437 let _ = textlist.update();
438 } else {
439 let _ = textlist.last();
438 } 440 }
439 441
440 if is_left_list { 442 if is_left_list {
src/items/singleitem.rs +3 −8
@@ -1084,15 +1084,10 @@ impl FrameworkItem for SingleItem {
1084 1084
1085 // clicking on rows after the last item 1085 // clicking on rows after the last item
1086 if y > textlist.items.len() + 1 { 1086 if y > textlist.items.len() + 1 {
1087 return false; 1087 let _ = textlist.last();
1088 } 1088 } else if y <= textlist.selected {
1089
1090 // moving the cursor
1091 if y <= textlist.selected {
1092 textlist.selected = y; 1089 textlist.selected = y;
1093 } 1090 } else if y >= textlist.selected + 2 {
1094
1095 if y >= textlist.selected + 2 {
1096 textlist.selected = y - 2; 1091 textlist.selected = y - 2;
1097 } 1092 }
1098 1093
src/items/videolist.rs +3 −8
@@ -507,15 +507,10 @@ impl FrameworkItem for VideoList {
507 507
508 // clicking on rows after the last item 508 // clicking on rows after the last item
509 if y > self.selector.items.len() + 1 { 509 if y > self.selector.items.len() + 1 {
510 return false; 510 let _ = self.selector.last();
511 } 511 } else if y <= self.selector.selected {
512
513 // moving the cursor
514 if y <= self.selector.selected {
515 self.selector.selected = y; 512 self.selector.selected = y;
516 } 513 } else if y >= self.selector.selected + 2 {
517
518 if y >= self.selector.selected + 2 {
519 self.selector.selected = y - 2; 514 self.selector.selected = y - 2;
520 } 515 }
521 516