Fix issue #1780
This commit is contained in:
parent
37aefe99c2
commit
52ce34fae9
4 changed files with 14 additions and 12 deletions
|
@ -445,9 +445,7 @@ public class AudioVideoNotesPlugin extends OsmandPlugin {
|
|||
}
|
||||
audioNotesLayer = new AudioNotesLayer(activity, this);
|
||||
activity.getMapView().addLayer(audioNotesLayer, 3.5f);
|
||||
if (recordControl == null) {
|
||||
registerWidget(activity);
|
||||
}
|
||||
registerWidget(activity);
|
||||
}
|
||||
|
||||
private void registerMediaListener(AudioManager am) {
|
||||
|
|
|
@ -296,22 +296,25 @@ public class DownloadActivity extends BaseDownloadActivity {
|
|||
|| application.getSettings().SHOULD_SHOW_FREE_VERSION_BANNER.get();
|
||||
|
||||
initFreeVersionBanner();
|
||||
updateFreeVersionBanner();
|
||||
updateBannerInProgress();
|
||||
|
||||
if (ctx.getCurrentTab() != UPDATES_TAB_NUMBER) {
|
||||
downloadProgressLayout.setVisibility(View.VISIBLE);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void updateBannerInProgress() {
|
||||
updateBannerInProgress(true);
|
||||
}
|
||||
|
||||
public void updateBannerInProgress(boolean showSpace) {
|
||||
BasicProgressAsyncTask<?, ?, ?, ?> basicProgressAsyncTask = ctx.getDownloadThread().getCurrentRunningTask();
|
||||
final boolean isFinished = basicProgressAsyncTask == null
|
||||
|| basicProgressAsyncTask.getStatus() == AsyncTask.Status.FINISHED;
|
||||
if (isFinished) {
|
||||
downloadProgressLayout.setOnClickListener(null);
|
||||
updateDescriptionTextWithSize(ctx, downloadProgressLayout);
|
||||
if (ctx.getCurrentTab() == UPDATES_TAB_NUMBER) {
|
||||
if (ctx.getCurrentTab() == UPDATES_TAB_NUMBER || !showSpace) {
|
||||
downloadProgressLayout.setVisibility(View.GONE);
|
||||
}
|
||||
updateFreeVersionBanner();
|
||||
|
@ -373,6 +376,7 @@ public class DownloadActivity extends BaseDownloadActivity {
|
|||
});
|
||||
laterButton.setOnClickListener(new ToggleCollapseFreeVersionBanner(freeVersionDescriptionTextView,
|
||||
buttonsLinearLayout, freeVersionBannerTitle, application.getSettings()));
|
||||
updateFreeVersionBanner();
|
||||
}
|
||||
|
||||
private void updateFreeVersionBanner() {
|
||||
|
|
|
@ -153,7 +153,7 @@ public class DownloadResourceGroupFragment extends DialogFragment implements Dow
|
|||
@Override
|
||||
public void newDownloadIndexes() {
|
||||
if(banner != null) {
|
||||
banner.updateBannerInProgress();
|
||||
banner.updateBannerInProgress(false);
|
||||
}
|
||||
reloadData();
|
||||
}
|
||||
|
@ -161,7 +161,7 @@ public class DownloadResourceGroupFragment extends DialogFragment implements Dow
|
|||
@Override
|
||||
public void downloadHasFinished() {
|
||||
if(banner != null) {
|
||||
banner.updateBannerInProgress();
|
||||
banner.updateBannerInProgress(false);
|
||||
}
|
||||
listAdapter.notifyDataSetChanged();
|
||||
}
|
||||
|
@ -169,7 +169,7 @@ public class DownloadResourceGroupFragment extends DialogFragment implements Dow
|
|||
@Override
|
||||
public void downloadInProgress() {
|
||||
if(banner != null) {
|
||||
banner.updateBannerInProgress();
|
||||
banner.updateBannerInProgress(false);
|
||||
}
|
||||
listAdapter.notifyDataSetChanged();
|
||||
}
|
||||
|
|
|
@ -151,7 +151,7 @@ public class SearchDialogFragment extends DialogFragment implements DownloadEven
|
|||
@Override
|
||||
public void newDownloadIndexes() {
|
||||
if(banner != null) {
|
||||
banner.updateBannerInProgress();
|
||||
banner.updateBannerInProgress(false);
|
||||
}
|
||||
updateSearchText(searchText);
|
||||
}
|
||||
|
@ -159,7 +159,7 @@ public class SearchDialogFragment extends DialogFragment implements DownloadEven
|
|||
@Override
|
||||
public void downloadHasFinished() {
|
||||
if(banner != null) {
|
||||
banner.updateBannerInProgress();
|
||||
banner.updateBannerInProgress(false);
|
||||
}
|
||||
listAdapter.notifyDataSetChanged();
|
||||
}
|
||||
|
@ -167,7 +167,7 @@ public class SearchDialogFragment extends DialogFragment implements DownloadEven
|
|||
@Override
|
||||
public void downloadInProgress() {
|
||||
if(banner != null) {
|
||||
banner.updateBannerInProgress();
|
||||
banner.updateBannerInProgress(false);
|
||||
}
|
||||
listAdapter.notifyDataSetChanged();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue