|
@@ -5359,19 +5359,27 @@
|
|
|
|
|
|
// ======== MGSwipe ========
|
|
|
|
|
|
- //configure left buttons
|
|
|
- if (metadata.favorite)
|
|
|
- cell.leftButtons = @[[MGSwipeButton buttonWithTitle:[NSString stringWithFormat:@" %@ ", NSLocalizedString(@"_unfavorite_", nil)] icon:[UIImage imageNamed:@"swipeUnfavorite"] backgroundColor:[UIColor colorWithRed:242.0/255.0 green:220.0/255.0 blue:132.0/255.0 alpha:1.000]]];
|
|
|
- else
|
|
|
- cell.leftButtons = @[[MGSwipeButton buttonWithTitle:[NSString stringWithFormat:@" %@ ", NSLocalizedString(@"_favorite_", nil)] icon:[UIImage imageNamed:@"swipeFavorite"] backgroundColor:[UIColor colorWithRed:242.0/255.0 green:220.0/255.0 blue:132.0/255.0 alpha:1.000]]];
|
|
|
- cell.leftExpansion.buttonIndex = 0;
|
|
|
- cell.leftExpansion.fillOnTrigger = NO;
|
|
|
+ //Left only plain
|
|
|
+ if (metadata.cryptated == NO) {
|
|
|
+
|
|
|
+ if (metadata.favorite)
|
|
|
+ cell.leftButtons = @[[MGSwipeButton buttonWithTitle:[NSString stringWithFormat:@" %@ ", NSLocalizedString(@"_unfavorite_", nil)] icon:[UIImage imageNamed:@"swipeUnfavorite"] backgroundColor:[UIColor colorWithRed:242.0/255.0 green:220.0/255.0 blue:132.0/255.0 alpha:1.000]]];
|
|
|
+ else
|
|
|
+ cell.leftButtons = @[[MGSwipeButton buttonWithTitle:[NSString stringWithFormat:@" %@ ", NSLocalizedString(@"_favorite_", nil)] icon:[UIImage imageNamed:@"swipeFavorite"] backgroundColor:[UIColor colorWithRed:242.0/255.0 green:220.0/255.0 blue:132.0/255.0 alpha:1.000]]];
|
|
|
+
|
|
|
+ cell.leftExpansion.buttonIndex = 0;
|
|
|
+ cell.leftExpansion.fillOnTrigger = NO;
|
|
|
|
|
|
- //centerIconOverText
|
|
|
- MGSwipeButton *favoriteButton = (MGSwipeButton *)[cell.leftButtons objectAtIndex:0];
|
|
|
- [favoriteButton centerIconOverText];
|
|
|
+ //centerIconOverText
|
|
|
+ MGSwipeButton *favoriteButton = (MGSwipeButton *)[cell.leftButtons objectAtIndex:0];
|
|
|
+ [favoriteButton centerIconOverText];
|
|
|
+
|
|
|
+ } else {
|
|
|
+
|
|
|
+ cell.leftButtons = [NSArray new];
|
|
|
+ }
|
|
|
|
|
|
- //configure right buttons
|
|
|
+ //Right
|
|
|
cell.rightButtons = @[[MGSwipeButton buttonWithTitle:[NSString stringWithFormat:@" %@ ", NSLocalizedString(@"_delete_", nil)] icon:[UIImage imageNamed:@"swipeDelete"] backgroundColor:[UIColor redColor]], [MGSwipeButton buttonWithTitle:[NSString stringWithFormat:@" %@ ", NSLocalizedString(@"_more_", nil)] icon:[UIImage imageNamed:@"swipeMore"] backgroundColor:[UIColor lightGrayColor]]];
|
|
|
cell.rightSwipeSettings.transition = MGSwipeTransitionBorder;
|
|
|
|