Dmitry Donskoy 2019-06-06 19:10:07 +03:00 committed by Aleksandr Zatsepin
parent 0e8f704106
commit d46cd16182
2 changed files with 9 additions and 8 deletions

View file

@ -45,7 +45,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="@style/MwmTextAppearance.Title"
android:textSize="20sp"
android:textSize="@dimen/text_size_toolbar"
android:gravity="center_horizontal"
tools:text="Some title very loooooooooong title"/>
<TextView

View file

@ -263,21 +263,22 @@ public class OnmapDownloader implements MwmActivity.LeftAnimationTrackListener
return;
mPromoBanner = Framework.nativeGetDownloaderPromoBanner(mCurrentCountry.id);
boolean isPromoNotFound = mPromoBanner.getType() == DownloaderPromoBanner.DOWNLOADER_PROMO_TYPE_NO_PROMO;
boolean isPromoFound = mPromoBanner.getType() != DownloaderPromoBanner.DOWNLOADER_PROMO_TYPE_NO_PROMO;
boolean enqueued = mCurrentCountry.status == CountryItem.STATUS_ENQUEUED;
boolean progress = mCurrentCountry.status == CountryItem.STATUS_PROGRESS;
boolean applying = mCurrentCountry.status == CountryItem.STATUS_APPLYING;
boolean hasDialog = enqueued || progress || applying;
mPromoContentDivider.setVisibility(isPromoNotFound || !hasDialog ? View.GONE : View.VISIBLE);
boolean isDownloading = enqueued || progress || applying;
UiUtils.showIf(isPromoFound && isDownloading, mPromoContentDivider);
if (isPromoNotFound)
if (!isPromoFound)
return;
boolean hasPromo = mPromoBanner.getType() == DownloaderPromoBanner.DOWNLOADER_PROMO_TYPE_MEGAFON;
boolean hasMegafonPromo = mPromoBanner.getType() == DownloaderPromoBanner.DOWNLOADER_PROMO_TYPE_MEGAFON;
boolean hasCatalogPromo = mPromoBanner.getType() == DownloaderPromoBanner.DOWNLOADER_PROMO_TYPE_BOOKMARK_CATALOG;
UiUtils.showIf(hasDialog && hasPromo, mFrame, R.id.banner);
UiUtils.showIf(hasDialog && !hasPromo, mCatalogCallToActionContainer);
UiUtils.showIf(isDownloading && hasMegafonPromo, mFrame, R.id.banner);
UiUtils.showIf(isDownloading && hasCatalogPromo, mCatalogCallToActionContainer);
}
@Override