Merge pull request #297 from kiwix/reintroduce-taskbar

Reintroduce taskbar
This commit is contained in:
Kelson 2019-11-26 08:55:19 -05:00 committed by GitHub
commit ea3349f37c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 1 deletions

View File

@ -1,3 +1,8 @@
kiwix-lib 8.2.1
===============
* Reintroduce kiwix-serve taskbar
kiwix-lib 8.2.0
===============

View File

@ -1,5 +1,5 @@
project('kiwix-lib', 'cpp',
version : '8.2.0', # Also change this in android-kiwix-lib-publisher/kiwixLibAndroid/build.gradle
version : '8.2.1', # Also change this in android-kiwix-lib-publisher/kiwixLibAndroid/build.gradle
license : 'GPL',
default_options : ['c_std=c11', 'cpp_std=c++11', 'werror=true'])

View File

@ -870,6 +870,10 @@ Response InternalServer::handle_content(const RequestContext& request)
zim::Blob raw_content = entry.getBlob();
content = string(raw_content.data(), raw_content.size());
auto response = get_default_response();
if (mimeType.find("text/html") != string::npos)
response.set_taskbar(bookName, reader->getTitle());
response.set_mimeType(mimeType);
response.set_content(content);
response.set_compress(true);