Updates in download activity
This commit is contained in:
parent
f40cc08002
commit
7c2745d4c1
5 changed files with 6 additions and 5 deletions
|
@ -58,6 +58,7 @@
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:textSize="@dimen/default_sub_text_size"
|
android:textSize="@dimen/default_sub_text_size"
|
||||||
|
android:textColor="@color/color_ok"
|
||||||
tools:text="@string/lorem_ipsum"
|
tools:text="@string/lorem_ipsum"
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
android:maxLines="1"/>
|
android:maxLines="1"/>
|
||||||
|
|
|
@ -310,7 +310,7 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<string name="local_index_installed">Локальная версия</string>
|
<string name="local_index_installed">Загружено</string>
|
||||||
<string name="local_index_items_backuped">%1$d из %2$d объектов успешно архивированы.</string>
|
<string name="local_index_items_backuped">%1$d из %2$d объектов успешно архивированы.</string>
|
||||||
<string name="local_index_items_deleted">%1$d из %2$d объектов успешно удалены.</string>
|
<string name="local_index_items_deleted">%1$d из %2$d объектов успешно удалены.</string>
|
||||||
<string name="local_index_items_restored">%1$d из %2$d объектов успешно активированы.</string>
|
<string name="local_index_items_restored">%1$d из %2$d объектов успешно активированы.</string>
|
||||||
|
|
|
@ -38,11 +38,11 @@ public class BaseDownloadActivity extends ActionBarProgressActivity {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
|
||||||
settings = ((OsmandApplication) getApplication()).getSettings();
|
settings = ((OsmandApplication) getApplication()).getSettings();
|
||||||
if (downloadListIndexThread == null) {
|
if (downloadListIndexThread == null) {
|
||||||
downloadListIndexThread = new DownloadIndexesThread(this);
|
downloadListIndexThread = new DownloadIndexesThread(this);
|
||||||
}
|
}
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
// Having the next line here causes bug AND-197: The storage folder dialogue popped up upon EVERY app startup, because the map list is not indexed yet.
|
// Having the next line here causes bug AND-197: The storage folder dialogue popped up upon EVERY app startup, because the map list is not indexed yet.
|
||||||
// Hence line moved to updateDownloads() now.
|
// Hence line moved to updateDownloads() now.
|
||||||
// prepareDownloadDirectory();
|
// prepareDownloadDirectory();
|
||||||
|
|
|
@ -84,8 +84,9 @@ public class DownloadOsmandIndexesHelper {
|
||||||
if (target.endsWith("-tts/_ttsconfig.p") && target.startsWith("voice/")) {
|
if (target.endsWith("-tts/_ttsconfig.p") && target.startsWith("voice/")) {
|
||||||
String voice = target.substring("voice/".length(), target.length() - "/_ttsconfig.p".length());
|
String voice = target.substring("voice/".length(), target.length() - "/_ttsconfig.p".length());
|
||||||
File destFile = new File(voicePath, voice + File.separatorChar + "_ttsconfig.p");
|
File destFile = new File(voicePath, voice + File.separatorChar + "_ttsconfig.p");
|
||||||
result.add(new AssetIndexItem(voice +ext, "voice", date, dateModified,
|
|
||||||
"0.1", 1024*100, key, destFile.getPath(), DownloadActivityType.VOICE_FILE));
|
result.add(new AssetIndexItem(voice + ext, "voice", date, dateModified, "0.1", destFile.length(), key,
|
||||||
|
destFile.getPath(), DownloadActivityType.VOICE_FILE));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
result.sort();
|
result.sort();
|
||||||
|
|
|
@ -103,7 +103,6 @@ public class UpdatesIndexFragment extends ListFragment {
|
||||||
private void createListView() {
|
private void createListView() {
|
||||||
updateHeader();
|
updateHeader();
|
||||||
if (indexItems.size() == 0) {
|
if (indexItems.size() == 0) {
|
||||||
indexItems.clear();
|
|
||||||
if (DownloadActivity.downloadListIndexThread.isDownloadedFromInternet()) {
|
if (DownloadActivity.downloadListIndexThread.isDownloadedFromInternet()) {
|
||||||
indexItems.add(new IndexItem(getString(R.string.everything_up_to_date), "", 0, "", 0, 0, null));
|
indexItems.add(new IndexItem(getString(R.string.everything_up_to_date), "", 0, "", 0, 0, null));
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue