From cf6c4a8cc1df47941968f88eeaa4f13b0fb3160b Mon Sep 17 00:00:00 2001 From: vanhofen Date: Mon, 19 Jul 2021 17:26:59 +0200 Subject: [PATCH] infoviewer: simplify setInfobarTimeout() Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/89ba2b9636cf73c451eef525e4f5dc1b81d7fe35 Author: vanhofen Date: 2021-07-19 (Mon, 19 Jul 2021) Origin message was: ------------------ - infoviewer: simplify setInfobarTimeout() ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/infoviewer.cpp | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/src/gui/infoviewer.cpp b/src/gui/infoviewer.cpp index df0048272..9f7cab52c 100644 --- a/src/gui/infoviewer.cpp +++ b/src/gui/infoviewer.cpp @@ -966,35 +966,22 @@ void CInfoViewer::setInfobarTimeout(int timeout_ext) case NeutrinoModes::mode_radio: case NeutrinoModes::mode_webradio: timeout = g_settings.handling_infobar[SNeutrinoSettings::HANDLING_INFOBAR_RADIO]; - if (timeout < 0) - timeout = 0; - timeoutEnd = CRCInput::calcTimeoutEnd(timeout + timeout_ext); break; case NeutrinoModes::mode_ts: if (CMoviePlayerGui::getInstance().IsAudioPlaying()) - { timeout = g_settings.handling_infobar[SNeutrinoSettings::HANDLING_INFOBAR_MEDIA_AUDIO]; - if (timeout < 0) - timeout = 0; - timeoutEnd = CRCInput::calcTimeoutEnd(timeout + timeout_ext); - } else - { timeout = g_settings.handling_infobar[SNeutrinoSettings::HANDLING_INFOBAR_MEDIA_VIDEO]; - if (timeout < 0) - timeout = 0; - timeoutEnd = CRCInput::calcTimeoutEnd(timeout + timeout_ext); - } break; case NeutrinoModes::mode_tv: case NeutrinoModes::mode_webtv: default: timeout = g_settings.handling_infobar[SNeutrinoSettings::HANDLING_INFOBAR]; - if (timeout < 0) - timeout = 0; - timeoutEnd = CRCInput::calcTimeoutEnd(timeout + timeout_ext); break; } + if (timeout < 0) + timeout = 0; + timeoutEnd = CRCInput::calcTimeoutEnd(timeout + timeout_ext); } bool CInfoViewer::showLivestreamInfo()