forked from organicmaps/organicmaps
[android] night theme is added for guides catalog
This commit is contained in:
parent
3fc748d792
commit
56369e35c4
2 changed files with 6 additions and 0 deletions
|
@ -51,6 +51,7 @@ import com.mapswithme.util.ConnectionState;
|
|||
import com.mapswithme.util.CrashlyticsUtils;
|
||||
import com.mapswithme.util.HttpClient;
|
||||
import com.mapswithme.util.KeyValue;
|
||||
import com.mapswithme.util.ThemeUtils;
|
||||
import com.mapswithme.util.UiUtils;
|
||||
import com.mapswithme.util.Utils;
|
||||
import com.mapswithme.util.log.Logger;
|
||||
|
@ -297,6 +298,9 @@ public class BookmarksCatalogFragment extends BaseWebViewMwmFragment
|
|||
if (!TextUtils.isEmpty(productDetailsBundle))
|
||||
headers.put(HttpClient.HEADER_BUNDLE_TIERS, productDetailsBundle);
|
||||
|
||||
if (ThemeUtils.isNightTheme())
|
||||
headers.put(HttpClient.HEADER_THEME_KEY, HttpClient.HEADER_THEME_DARK);
|
||||
|
||||
for (KeyValue header : BookmarkManager.INSTANCE.getCatalogHeaders())
|
||||
{
|
||||
if (!TextUtils.isEmpty(header.getValue()))
|
||||
|
|
|
@ -57,6 +57,8 @@ public final class HttpClient
|
|||
public static final String HEADER_AUTHORIZATION = "Authorization";
|
||||
public static final String HEADER_BEARER_PREFFIX = "Bearer ";
|
||||
public static final String HEADER_BUNDLE_TIERS = "X-Mapsme-Bundle-Tiers";
|
||||
public static final String HEADER_THEME_KEY = "x-mapsme-theme";
|
||||
public static final String HEADER_THEME_DARK = "dark";
|
||||
private final static String TAG = HttpClient.class.getSimpleName();
|
||||
// TODO(AlexZ): tune for larger files
|
||||
private final static int STREAM_BUFFER_SIZE = 1024 * 64;
|
||||
|
|
Loading…
Add table
Reference in a new issue