media library: change data fetch delay to 250ms
This commit is contained in:
@@ -47,7 +47,8 @@ MediaLibrary *myLibrary;
|
||||
|
||||
namespace {
|
||||
|
||||
const auto fetch_delay = boost::posix_time::milliseconds(500);
|
||||
const auto ml_wtimeout = 250;
|
||||
const auto fetch_delay = boost::posix_time::milliseconds(ml_wtimeout);
|
||||
|
||||
bool hasTwoColumns;
|
||||
size_t itsLeftColStartX;
|
||||
@@ -422,6 +423,14 @@ void MediaLibrary::update()
|
||||
}
|
||||
}
|
||||
|
||||
int MediaLibrary::windowTimeout()
|
||||
{
|
||||
if (Albums.reallyEmpty() || Songs.reallyEmpty())
|
||||
return ml_wtimeout;
|
||||
else
|
||||
return Screen<WindowType>::windowTimeout();
|
||||
}
|
||||
|
||||
void MediaLibrary::enterPressed()
|
||||
{
|
||||
AddToPlaylist(true);
|
||||
|
||||
@@ -37,6 +37,8 @@ struct MediaLibrary: Screen<NC::Window *>, Filterable, HasColumns, HasSongs, Sea
|
||||
virtual void refresh() OVERRIDE;
|
||||
virtual void update() OVERRIDE;
|
||||
|
||||
virtual int windowTimeout() OVERRIDE;
|
||||
|
||||
virtual void enterPressed() OVERRIDE;
|
||||
virtual void spacePressed() OVERRIDE;
|
||||
virtual void mouseButtonPressed(MEVENT me) OVERRIDE;
|
||||
|
||||
Reference in New Issue
Block a user