deleteLater() on failure

This commit is contained in:
NepNep21 2023-12-21 22:05:24 -03:00
parent a691f5de3c
commit c4ab063aec
No known key found for this signature in database
GPG key ID: 60372BB5B7534B09

View file

@ -955,8 +955,9 @@ void
InputBar::toggleIgnore(const QString &user, const bool ignored) InputBar::toggleIgnore(const QString &user, const bool ignored)
{ {
UserProfile *profile = new UserProfile(QString(), user, TimelineViewManager::instance()); UserProfile *profile = new UserProfile(QString(), user, TimelineViewManager::instance());
connect(profile, &UserProfile::failedToFetchProfile, [user] { connect(profile, &UserProfile::failedToFetchProfile, [user, profile] {
MainWindow::instance()->showNotification(tr("Failed to fetch user %1").arg(user)); MainWindow::instance()->showNotification(tr("Failed to fetch user %1").arg(user));
profile->deleteLater();
}); });
connect( connect(