diff --git a/saoriconfiguredialog.ui b/saoriconfiguredialog.ui
index 1c13380..20d80ac 100644
--- a/saoriconfiguredialog.ui
+++ b/saoriconfiguredialog.ui
@@ -32,7 +32,14 @@
-
-
+
+
+ 1
+
+
+ 40
+
+
-
@@ -42,7 +49,11 @@
-
-
+
+
+ 1
+
+
-
@@ -66,7 +77,14 @@
-
-
+
+
+ 1
+
+
+ 500
+
+
-
diff --git a/saoriview.cpp b/saoriview.cpp
index 34814bd..9b3b065 100644
--- a/saoriview.cpp
+++ b/saoriview.cpp
@@ -33,6 +33,7 @@
#include
#include
#include
+#include
#include
#include "saoriapplication.h"
#include "saoriview.h"
@@ -47,6 +48,7 @@
ui->setupUi(this);
ui->tootWidget->hide();
+ m_timecount = 0;
m_viewname = view;
m_account = account;
m_viewList.append(this);
@@ -105,6 +107,7 @@
saoriaccount->postNewStatus(m_viewname,data);
});
}
+ QTimer::singleShot(60000,this,&SaoriView::timerUpdate);
}
SaoriView::~SaoriView()
@@ -413,6 +416,19 @@
}
}
+void SaoriView::timerUpdate()
+{
+ m_timecount ++;
+ if (ui->pushButton_autoreload->isChecked()) {
+ if (m_timecount >= SaoriApplication::saori()->setting()->value(
+ SAORI_SETTING_RELOADINT,SAORI_SETTING_RELOADINT_DEFAULT).toInt()) {
+ reload();
+ m_timecount = 0;
+ }
+ }
+ QTimer::singleShot(60000,this,&SaoriView::timerUpdate);
+}
+
void SaoriView::on_pushButton_newest_clicked()
{
ui->scrollArea->verticalScrollBar()->setValue(0);
diff --git a/saoriview.h b/saoriview.h
index ffdcdc4..2e66871 100644
--- a/saoriview.h
+++ b/saoriview.h
@@ -53,6 +53,7 @@
QString m_config;
QList m_entries;
qlonglong m_maxid;
+ int m_timecount;
static QList m_viewList;
@@ -78,6 +79,9 @@
void recived(const QString timeline,const QByteArray data);
void linkClicked(const QUrl &url);
+protected slots:
+ void timerUpdate();
+
private:
Ui::SaoriView *ui;