mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-25 20:48:52 +03:00
Use qobject_cast on TimelineItem
This commit is contained in:
parent
5e3022bd9a
commit
d1d8b92b37
1 changed files with 2 additions and 2 deletions
|
@ -374,7 +374,7 @@ TimelineView::addTimelineItem(TimelineItem *item, TimelineDirection direction)
|
|||
if (direction == TimelineDirection::Bottom) {
|
||||
const auto lastItemPosition = scroll_layout_->count() - 1;
|
||||
auto lastItem =
|
||||
static_cast<TimelineItem *>(scroll_layout_->itemAt(lastItemPosition)->widget());
|
||||
qobject_cast<TimelineItem *>(scroll_layout_->itemAt(lastItemPosition)->widget());
|
||||
|
||||
if (lastItem) {
|
||||
auto oldDate = lastItem->descriptionMessage().datetime;
|
||||
|
@ -389,7 +389,7 @@ TimelineView::addTimelineItem(TimelineItem *item, TimelineDirection direction)
|
|||
// the widgets to the bottom of the page.
|
||||
if (scroll_layout_->count() > 1) {
|
||||
auto firstItem =
|
||||
static_cast<TimelineItem *>(scroll_layout_->itemAt(1)->widget());
|
||||
qobject_cast<TimelineItem *>(scroll_layout_->itemAt(1)->widget());
|
||||
|
||||
if (firstItem) {
|
||||
auto oldDate = firstItem->descriptionMessage().datetime;
|
||||
|
|
Loading…
Reference in a new issue