Merge branch 'dev' of https://github.com/oxen-io/session-ios into ui-fix-2

pull/375/head
Ryan ZHAO 4 years ago
commit b619a8cb99

@ -48,10 +48,6 @@
<string>$(CURRENT_PROJECT_VERSION)</string> <string>$(CURRENT_PROJECT_VERSION)</string>
<key>ITSAppUsesNonExemptEncryption</key> <key>ITSAppUsesNonExemptEncryption</key>
<false/> <false/>
<key>LOGS_EMAIL</key>
<string>support@whispersystems.org</string>
<key>LOGS_URL</key>
<string>https://github.com/WhisperSystems/Signal-iOS/issues</string>
<key>LSApplicationCategoryType</key> <key>LSApplicationCategoryType</key>
<string>public.app-category.social-networking</string> <string>public.app-category.social-networking</string>
<key>LSRequiresIPhoneOS</key> <key>LSRequiresIPhoneOS</key>

@ -85,8 +85,9 @@ final class OpenGroupSuggestionGrid : UIView, UICollectionViewDataSource, UIColl
func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
let cell = collectionView.dequeueReusableCell(withReuseIdentifier: Cell.identifier, for: indexPath) as! Cell let cell = collectionView.dequeueReusableCell(withReuseIdentifier: Cell.identifier, for: indexPath) as! Cell
cell.showRightSeparator = (indexPath.row % 2 != 0) || (indexPath.row % 2 == 0 && indexPath.row == rooms.count - 1) let roomCount = min(rooms.count, 8)
cell.showBottomSeparator = (indexPath.row >= rooms.count - 2) cell.showRightSeparator = (indexPath.row % 2 != 0) || (indexPath.row % 2 == 0 && indexPath.row == roomCount - 1)
cell.showBottomSeparator = (indexPath.row >= roomCount - 2)
cell.room = rooms[indexPath.item] cell.room = rooms[indexPath.item]
return cell return cell
} }
@ -143,8 +144,8 @@ extension OpenGroupSuggestionGrid {
stackView.axis = .horizontal stackView.axis = .horizontal
stackView.spacing = Values.smallSpacing stackView.spacing = Values.smallSpacing
addSubview(stackView) addSubview(stackView)
stackView.center(in: self) stackView.center(.vertical, in: self)
stackView.leadingAnchor.constraint(greaterThanOrEqualTo: leadingAnchor, constant: Values.smallSpacing).isActive = true stackView.pin(.leading, to: .leading, of: self, withInset: Values.smallSpacing)
trailingAnchor.constraint(greaterThanOrEqualTo: stackView.trailingAnchor, constant: Values.smallSpacing).isActive = true trailingAnchor.constraint(greaterThanOrEqualTo: stackView.trailingAnchor, constant: Values.smallSpacing).isActive = true
setUpSeparators() setUpSeparators()
} }

Loading…
Cancel
Save