Commit 8ba1930c authored by Devin Lin's avatar Devin Lin 🎨
Browse files

homescreens/halcyon: Fix folder creation

parent d94888b5
......@@ -8,7 +8,7 @@
ApplicationFolder::ApplicationFolder(QObject *parent, QString name)
: QObject{parent}
, m_name{name}
, m_applicationFolderModel{nullptr}
, m_applicationFolderModel{new ApplicationFolderModel{this}}
{
}
......@@ -77,32 +77,26 @@ void ApplicationFolder::setApplications(QList<Application *> applications)
}
m_applications = applications;
m_applicationFolderModel = new ApplicationFolderModel{this};
Q_EMIT applicationsChanged();
Q_EMIT applicationsReset();
Q_EMIT saveRequested();
m_applicationFolderModel = new ApplicationFolderModel{this};
}
void ApplicationFolder::moveEntry(int fromRow, int toRow)
{
if (m_applicationFolderModel) {
m_applicationFolderModel->moveEntry(fromRow, toRow);
}
m_applicationFolderModel->moveEntry(fromRow, toRow);
}
void ApplicationFolder::addApp(const QString &storageId, int row)
{
if (m_applicationFolderModel) {
m_applicationFolderModel->addApp(storageId, row);
}
m_applicationFolderModel->addApp(storageId, row);
}
void ApplicationFolder::removeApp(int row)
{
if (m_applicationFolderModel) {
m_applicationFolderModel->removeApp(row);
}
m_applicationFolderModel->removeApp(row);
}
void ApplicationFolder::moveAppOut(int row)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment