|
@@ -138,8 +138,9 @@ public class EditorPersonal: UIViewController, ImageVideoPickerDelegate, UIGestu
|
|
|
if indexPath != nil {
|
|
|
let headerRect = tableChatView.rectForHeader(inSection: indexPath!.section)
|
|
|
let isPinned = headerRect.origin.y <= tableChatView.contentOffset.y
|
|
|
- if listViewOnSection.count != 0 && listViewOnSection.count - 1 <= indexPath!.section && isPinned {
|
|
|
- let headerView = listViewOnSection[currentIndexpath!.section]
|
|
|
+ if listViewOnSection.count != 0 && listViewOnSection.count - 1 == indexPath!.section && isPinned {
|
|
|
+ let sect = listViewOnSection.count - 1 < currentIndexpath!.section ? listViewOnSection.count - 1 : currentIndexpath!.section
|
|
|
+ let headerView = listViewOnSection[sect]
|
|
|
headerView.isHidden = true
|
|
|
}
|
|
|
}
|
|
@@ -5952,8 +5953,9 @@ extension EditorPersonal: UITableViewDelegate, UITableViewDataSource {
|
|
|
if indexPath != nil {
|
|
|
let headerRect = tableChatView.rectForHeader(inSection: indexPath!.section)
|
|
|
let isPinned = headerRect.origin.y <= scrollView.contentOffset.y
|
|
|
- if listViewOnSection.count != 0 && listViewOnSection.count - 1 <= indexPath!.section && indexPath!.row > 0 {
|
|
|
- let headerView = listViewOnSection[currentIndexpath!.section]
|
|
|
+ if listViewOnSection.count != 0 && listViewOnSection.count - 1 == indexPath!.section && indexPath!.row > 0 {
|
|
|
+ let sect = listViewOnSection.count - 1 < currentIndexpath!.section ? listViewOnSection.count - 1 : currentIndexpath!.section
|
|
|
+ let headerView = listViewOnSection[sect]
|
|
|
headerView.isHidden = true
|
|
|
}
|
|
|
}
|
|
@@ -5965,8 +5967,9 @@ extension EditorPersonal: UITableViewDelegate, UITableViewDataSource {
|
|
|
if indexPath != nil {
|
|
|
let headerRect = tableChatView.rectForHeader(inSection: indexPath!.section)
|
|
|
let isPinned = headerRect.origin.y <= scrollView.contentOffset.y
|
|
|
- if listViewOnSection.count != 0 && listViewOnSection.count - 1 <= indexPath!.section && isPinned {
|
|
|
- let headerView = listViewOnSection[currentIndexpath!.section]
|
|
|
+ if listViewOnSection.count != 0 && listViewOnSection.count - 1 == indexPath!.section && isPinned {
|
|
|
+ let sect = listViewOnSection.count - 1 < currentIndexpath!.section ? listViewOnSection.count - 1 : currentIndexpath!.section
|
|
|
+ let headerView = listViewOnSection[sect]
|
|
|
headerView.isHidden = true
|
|
|
}
|
|
|
}
|