assign new arrow id when arrow is moved to transformed card (#5012)

* add timeout to settingscache

* assign new arrow id when arrow is moved to transformed card

fixes bug introduced in #4907
fixes #5008
This commit is contained in:
ebbit1q 2024-03-27 14:47:00 +01:00 committed by GitHub
parent e8c7fba8b0
commit f174614496
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 30 additions and 11 deletions

View file

@ -32,6 +32,7 @@ RemoteClient::RemoteClient(QObject *parent)
{
clearNewClientFeatures();
maxTimeout = SettingsCache::instance().getTimeOut();
int keepalive = SettingsCache::instance().getKeepAlive();
timer = new QTimer(this);
timer->setInterval(keepalive * 1000);

View file

@ -89,7 +89,7 @@ private slots:
void submitForgotPasswordChallengeResponse(const Response &response);
private:
static const int maxTimeout = 5;
int maxTimeout;
int timeRunning, lastDataReceived;
QByteArray inputBuffer;
bool messageInProgress;

View file

@ -195,6 +195,7 @@ SettingsCache::SettingsCache()
lang = settings->value("personal/lang").toString();
keepalive = settings->value("personal/keepalive", 3).toInt();
timeout = settings->value("personal/timeout", 5).toInt();
// tip of the day settings
showTipsOnStartup = settings->value("tipOfDay/showTips", true).toBool();

View file

@ -134,6 +134,7 @@ private:
bool spectatorsCanSeeEverything;
bool createGameAsSpectator;
int keepalive;
int timeout;
void translateLegacySettings();
QString getSafeConfigPath(QString configEntry, QString defaultPath) const;
QString getSafeConfigFilePath(QString configEntry, QString defaultPath) const;
@ -434,6 +435,10 @@ public:
{
return keepalive;
}
int getTimeOut() const
{
return timeout;
}
int getMaxFontSize() const
{
return maxFontSize;