зеркало из https://github.com/nextcloud/talk-ios.git
Add favorite indicator in room list.
Signed-off-by: Ivan Sein <ivan@nextcloud.com>
This commit is contained in:
Родитель
d3c17046f2
Коммит
87440263ac
|
@ -55,10 +55,15 @@
|
||||||
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="0.5" colorSpace="custom" customColorSpace="sRGB"/>
|
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="0.5" colorSpace="custom" customColorSpace="sRGB"/>
|
||||||
<nil key="highlightedColor"/>
|
<nil key="highlightedColor"/>
|
||||||
</label>
|
</label>
|
||||||
|
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="dQI-ne-wFt">
|
||||||
|
<rect key="frame" x="45" y="8" width="20" height="20"/>
|
||||||
|
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||||
|
</imageView>
|
||||||
</subviews>
|
</subviews>
|
||||||
</tableViewCellContentView>
|
</tableViewCellContentView>
|
||||||
<connections>
|
<connections>
|
||||||
<outlet property="dateLabel" destination="iMQ-sR-n2H" id="aA6-go-w56"/>
|
<outlet property="dateLabel" destination="iMQ-sR-n2H" id="aA6-go-w56"/>
|
||||||
|
<outlet property="favoriteImage" destination="dQI-ne-wFt" id="AgV-VE-JLZ"/>
|
||||||
<outlet property="labelSubTitle" destination="FDH-Ta-zgI" id="NHp-dM-chx"/>
|
<outlet property="labelSubTitle" destination="FDH-Ta-zgI" id="NHp-dM-chx"/>
|
||||||
<outlet property="labelTitle" destination="L2w-ad-rRt" id="CNq-cb-Kc7"/>
|
<outlet property="labelTitle" destination="L2w-ad-rRt" id="CNq-cb-Kc7"/>
|
||||||
<outlet property="roomImage" destination="eGM-8o-ipF" id="Ae7-yR-KGf"/>
|
<outlet property="roomImage" destination="eGM-8o-ipF" id="Ae7-yR-KGf"/>
|
||||||
|
|
|
@ -0,0 +1,23 @@
|
||||||
|
{
|
||||||
|
"images" : [
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"filename" : "favorite-room.png",
|
||||||
|
"scale" : "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"filename" : "favorite-room@2x.png",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"filename" : "favorite-room@3x.png",
|
||||||
|
"scale" : "3x"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"info" : {
|
||||||
|
"version" : 1,
|
||||||
|
"author" : "xcode"
|
||||||
|
}
|
||||||
|
}
|
Двоичные данные
VideoCalls/Images.xcassets/favorite-room.imageset/favorite-room.png
поставляемый
Normal file
Двоичные данные
VideoCalls/Images.xcassets/favorite-room.imageset/favorite-room.png
поставляемый
Normal file
Двоичный файл не отображается.
После Ширина: | Высота: | Размер: 519 B |
Двоичные данные
VideoCalls/Images.xcassets/favorite-room.imageset/favorite-room@2x.png
поставляемый
Normal file
Двоичные данные
VideoCalls/Images.xcassets/favorite-room.imageset/favorite-room@2x.png
поставляемый
Normal file
Двоичный файл не отображается.
После Ширина: | Высота: | Размер: 962 B |
Двоичные данные
VideoCalls/Images.xcassets/favorite-room.imageset/favorite-room@3x.png
поставляемый
Normal file
Двоичные данные
VideoCalls/Images.xcassets/favorite-room.imageset/favorite-room@3x.png
поставляемый
Normal file
Двоичный файл не отображается.
После Ширина: | Высота: | Размер: 1.3 KiB |
|
@ -17,6 +17,7 @@ extern NSString *const kRoomCellIdentifier;
|
||||||
@property (nonatomic, weak) IBOutlet UILabel *labelSubTitle;
|
@property (nonatomic, weak) IBOutlet UILabel *labelSubTitle;
|
||||||
@property (nonatomic, weak) IBOutlet UIView *unreadMessagesView;
|
@property (nonatomic, weak) IBOutlet UIView *unreadMessagesView;
|
||||||
@property (nonatomic, weak) IBOutlet UILabel *dateLabel;
|
@property (nonatomic, weak) IBOutlet UILabel *dateLabel;
|
||||||
|
@property (weak, nonatomic) IBOutlet UIImageView *favoriteImage;
|
||||||
|
|
||||||
@property (nonatomic, assign) BOOL titleOnly;
|
@property (nonatomic, assign) BOOL titleOnly;
|
||||||
|
|
||||||
|
|
|
@ -21,6 +21,7 @@ NSString *const kRoomCellIdentifier = @"RoomCellIdentifier";
|
||||||
|
|
||||||
self.roomImage.layer.cornerRadius = 24.0;
|
self.roomImage.layer.cornerRadius = 24.0;
|
||||||
self.roomImage.layer.masksToBounds = YES;
|
self.roomImage.layer.masksToBounds = YES;
|
||||||
|
self.favoriteImage.contentMode = UIViewContentModeCenter;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
|
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
|
||||||
|
@ -37,6 +38,7 @@ NSString *const kRoomCellIdentifier = @"RoomCellIdentifier";
|
||||||
[self.roomImage cancelImageDownloadTask];
|
[self.roomImage cancelImageDownloadTask];
|
||||||
|
|
||||||
self.roomImage.image = nil;
|
self.roomImage.image = nil;
|
||||||
|
self.favoriteImage.image = nil;
|
||||||
self.labelSubTitle.text = @"";
|
self.labelSubTitle.text = @"";
|
||||||
self.dateLabel.text = @"";
|
self.dateLabel.text = @"";
|
||||||
|
|
||||||
|
|
|
@ -741,6 +741,11 @@ typedef void (^FetchRoomsCompletionBlock)(BOOL success);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Set favorite image
|
||||||
|
if (room.isFavorite) {
|
||||||
|
[cell.favoriteImage setImage:[UIImage imageNamed:@"favorite-room"]];
|
||||||
|
}
|
||||||
|
|
||||||
cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
|
cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
|
||||||
|
|
||||||
return cell;
|
return cell;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче