Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

Update the app to the latest version of the Wikipedia app with adjust…

…emnts for DroidWiki
  • Loading branch information...
FlorianSW committed May 4, 2018
1 parent 6fc9f41 commit ad12a4489ff60d9514ce407b0a18a49b84fadf14
Showing with 1,627 additions and 2,686 deletions.
  1. +2 −2 app/build.gradle
  2. +0 −24 app/src/alpha/res/drawable/launcher_foreground.xml
  3. BIN app/src/alpha/res/mipmap-hdpi/launcher.png
  4. BIN app/src/alpha/res/mipmap-mdpi/launcher.png
  5. BIN app/src/alpha/res/mipmap-xhdpi/launcher.png
  6. BIN app/src/alpha/res/mipmap-xxhdpi/launcher.png
  7. BIN app/src/alpha/res/mipmap-xxxhdpi/launcher.png
  8. +2 −2 app/src/alpha/res/values/strings_no_translate.xml
  9. +5 −10 app/src/main/AndroidManifest.xml
  10. +1 −1 app/src/main/java/org/wikipedia/Constants.java
  11. +2 −2 app/src/main/java/org/wikipedia/dataclient/WikiSite.java
  12. +42 −43 app/src/main/java/org/wikipedia/feed/FeedContentType.java
  13. +8 −8 app/src/main/java/org/wikipedia/feed/FeedCoordinatorBase.java
  14. +36 −41 app/src/main/java/org/wikipedia/feed/aggregated/AggregatedFeedContentClient.java
  15. +0 −11 app/src/main/java/org/wikipedia/feed/onboarding/OnboardingClient.java
  16. +0 −6 app/src/main/java/org/wikipedia/navtab/NavTab.java
  17. +2 −1 app/src/main/java/org/wikipedia/page/PageTitle.java
  18. +1 −25 app/src/main/java/org/wikipedia/readinglist/ReadingListsFragment.java
  19. +1 −4 app/src/main/java/org/wikipedia/settings/AboutActivity.java
  20. +14 −14 app/src/main/java/org/wikipedia/settings/Prefs.java
  21. +1 −17 app/src/main/java/org/wikipedia/settings/SettingsPreferenceLoader.java
  22. +1 −1 app/src/main/java/org/wikipedia/util/L10nUtil.java
  23. +3 −6 app/src/main/java/org/wikipedia/views/ExploreOverflowView.java
  24. +1 −1 app/src/main/java/org/wikipedia/zero/WikipediaZeroHandler.java
  25. BIN app/src/main/res/drawable-xxhdpi/w_nav_mark.png
  26. BIN app/src/main/res/drawable/androide.png
  27. +0 −12 app/src/main/res/drawable/launcher_foreground.xml
  28. BIN app/src/main/res/drawable/lead_default.png
  29. BIN app/src/main/res/drawable/lead_default_dark.png
  30. BIN app/src/main/res/drawable/wp_wordmark.png
  31. +0 −31 app/src/main/res/layout/activity_about.xml
  32. +1 −1 app/src/main/res/layout/activity_single_fragment_with_toolbar.xml
  33. +0 −20 app/src/main/res/layout/view_explore_overflow.xml
  34. +1 −1 app/src/main/res/mipmap-anydpi-v26/launcher.xml
  35. BIN app/src/main/res/mipmap-hdpi/ic_launcher.png
  36. BIN app/src/main/res/mipmap-hdpi/launcher.png
  37. BIN app/src/main/res/mipmap-mdpi/ic_launcher.png
  38. BIN app/src/main/res/mipmap-mdpi/launcher.png
  39. BIN app/src/main/res/mipmap-xhdpi/ic_launcher.png
  40. BIN app/src/main/res/mipmap-xhdpi/launcher.png
  41. BIN app/src/main/res/mipmap-xxhdpi/ic_launcher.png
  42. BIN app/src/main/res/mipmap-xxhdpi/launcher.png
  43. BIN app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
  44. BIN app/src/main/res/mipmap-xxxhdpi/launcher.png
  45. +26 −26 app/src/main/res/values-af/strings.xml
  46. +12 −12 app/src/main/res/values-ak/strings.xml
  47. +4 −4 app/src/main/res/values-ar/strings.xml
  48. +3 −3 app/src/main/res/values-as/strings.xml
  49. +55 −55 app/src/main/res/values-ast/strings.xml
  50. +1 −1 app/src/main/res/values-av/strings.xml
  51. +2 −2 app/src/main/res/values-b+be+tarask/strings.xml
  52. +6 −6 app/src/main/res/values-b+kk+Cyrl/strings.xml
  53. +4 −4 app/src/main/res/values-ba/strings.xml
  54. +8 −8 app/src/main/res/values-be/strings.xml
  55. +3 −3 app/src/main/res/values-bg/strings.xml
  56. +3 −3 app/src/main/res/values-bho/strings.xml
  57. +3 −3 app/src/main/res/values-bn/strings.xml
  58. +39 −39 app/src/main/res/values-br/strings.xml
  59. +14 −14 app/src/main/res/values-bs/strings.xml
  60. +4 −4 app/src/main/res/values-ca/strings.xml
  61. +6 −6 app/src/main/res/values-ce/strings.xml
  62. +2 −2 app/src/main/res/values-ckb/strings.xml
  63. +20 −20 app/src/main/res/values-cnh/strings.xml
  64. +8 −8 app/src/main/res/values-cs/strings.xml
  65. +2 −2 app/src/main/res/values-cy/strings.xml
  66. +52 −52 app/src/main/res/values-da/strings.xml
  67. +56 −56 app/src/main/res/values-de/strings.xml
  68. +18 −18 app/src/main/res/values-diq/strings.xml
  69. +16 −16 app/src/main/res/values-el/strings.xml
  70. +2 −2 app/src/main/res/values-eo/strings.xml
  71. +54 −54 app/src/main/res/values-es/strings.xml
  72. +6 −6 app/src/main/res/values-et/strings.xml
  73. +51 −51 app/src/main/res/values-eu/strings.xml
  74. +3 −3 app/src/main/res/values-fa/strings.xml
  75. +54 −54 app/src/main/res/values-fi/strings.xml
  76. +13 −13 app/src/main/res/values-fo/strings.xml
  77. +8 −8 app/src/main/res/values-fr/strings.xml
  78. +54 −54 app/src/main/res/values-gl/strings.xml
  79. +1 −1 app/src/main/res/values-gu/strings.xml
  80. +3 −3 app/src/main/res/values-hi/strings.xml
  81. +5 −5 app/src/main/res/values-hr/strings.xml
  82. +3 −3 app/src/main/res/values-hu/strings.xml
  83. +1 −1 app/src/main/res/values-hy/strings.xml
  84. +16 −16 app/src/main/res/values-ia/strings.xml
  85. +52 −52 app/src/main/res/values-in/strings.xml
  86. +2 −2 app/src/main/res/values-io/strings.xml
  87. +53 −53 app/src/main/res/values-is/strings.xml
  88. +38 −38 app/src/main/res/values-it/strings.xml
  89. +5 −5 app/src/main/res/values-iw/strings.xml
  90. +9 −9 app/src/main/res/values-ja/strings.xml
  91. +2 −2 app/src/main/res/values-ji/strings.xml
  92. +12 −12 app/src/main/res/values-jv/strings.xml
  93. +2 −2 app/src/main/res/values-ka/strings.xml
  94. +36 −36 app/src/main/res/values-kab/strings.xml
  95. +1 −1 app/src/main/res/values-km/strings.xml
  96. +3 −3 app/src/main/res/values-ko/strings.xml
  97. +6 −6 app/src/main/res/values-ksh/strings.xml
  98. +1 −1 app/src/main/res/values-ku/strings.xml
  99. +3 −3 app/src/main/res/values-kw/strings.xml
  100. +2 −2 app/src/main/res/values-ky/strings.xml
  101. +35 −35 app/src/main/res/values-lb/strings.xml
  102. +20 −20 app/src/main/res/values-li/strings.xml
  103. +2 −2 app/src/main/res/values-lt/strings.xml
  104. +1 −1 app/src/main/res/values-lv/strings.xml
  105. +3 −3 app/src/main/res/values-mk/strings.xml
  106. +2 −2 app/src/main/res/values-mn/strings.xml
  107. +4 −4 app/src/main/res/values-mr/strings.xml
  108. +53 −53 app/src/main/res/values-ms/strings.xml
  109. +6 −6 app/src/main/res/values-mt/strings.xml
  110. +4 −4 app/src/main/res/values-my/strings.xml
  111. +39 −39 app/src/main/res/values-nb/strings.xml
  112. +5 −5 app/src/main/res/values-ne/strings.xml
  113. +42 −42 app/src/main/res/values-nl/strings.xml
  114. +2 −2 app/src/main/res/values-oc/strings.xml
  115. +2 −2 app/src/main/res/values-olo/strings.xml
  116. +1 −1 app/src/main/res/values-or/strings.xml
  117. +4 −4 app/src/main/res/values-pa/strings.xml
  118. +15 −15 app/src/main/res/values-pl/strings.xml
  119. +2 −2 app/src/main/res/values-ps/strings.xml
  120. +19 −19 app/src/main/res/values-pt-rBR/strings.xml
  121. +5 −5 app/src/main/res/values-pt/strings.xml
  122. +43 −43 app/src/main/res/values-qq/strings.xml
  123. +27 −27 app/src/main/res/values-ro/strings.xml
  124. +9 −9 app/src/main/res/values-ru/strings.xml
  125. +2 −2 app/src/main/res/values-sa/strings.xml
  126. +8 −8 app/src/main/res/values-sah/strings.xml
  127. +4 −4 app/src/main/res/values-sd/strings.xml
  128. +2 −2 app/src/main/res/values-shn/strings.xml
  129. +1 −1 app/src/main/res/values-si/strings.xml
  130. +4 −4 app/src/main/res/values-sk/strings.xml
  131. +1 −1 app/src/main/res/values-skr/strings.xml
  132. +1 −1 app/src/main/res/values-sl/strings.xml
  133. +15 −15 app/src/main/res/values-sq/strings.xml
  134. +8 −8 app/src/main/res/values-sr/strings.xml
  135. +4 −4 app/src/main/res/values-su/strings.xml
  136. +55 −55 app/src/main/res/values-sv/strings.xml
  137. +12 −12 app/src/main/res/values-sw/strings.xml
  138. +3 −3 app/src/main/res/values-ta/strings.xml
  139. +1 −1 app/src/main/res/values-tcy/strings.xml
  140. +2 −2 app/src/main/res/values-te/strings.xml
  141. +4 −4 app/src/main/res/values-th/strings.xml
  142. +22 −22 app/src/main/res/values-tl/strings.xml
  143. +18 −18 app/src/main/res/values-tr/strings.xml
  144. +4 −4 app/src/main/res/values-uk/strings.xml
  145. +2 −2 app/src/main/res/values-ur/strings.xml
  146. +6 −6 app/src/main/res/values-uz/strings.xml
  147. +35 −35 app/src/main/res/values-vi/strings.xml
  148. +2 −2 app/src/main/res/values-xmf/strings.xml
  149. +5 −5 app/src/main/res/values-zh-rTW/strings.xml
  150. +5 −5 app/src/main/res/values-zh/strings.xml
  151. +2 −2 app/src/main/res/values/dev_settings_strings.xml
  152. +0 −873 app/src/main/res/values/languages_list.xml
  153. +1 −1 app/src/main/res/values/preference_keys.xml
  154. +58 −58 app/src/main/res/values/strings.xml
  155. +3 −3 app/src/main/res/values/strings_no_translate.xml
  156. +0 −20 app/src/main/res/xml/preferences.xml
  157. +0 −6 app/src/main/res/xml/preferences_about.xml
@@ -52,11 +52,11 @@ android {
}

defaultConfig {
applicationId 'org.wikipedia'
applicationId 'de.droidwiki'
minSdkVersion 19
targetSdkVersion 27
versionCode 232
testApplicationId 'org.wikipedia.test'
testApplicationId 'de.droidwiki.test'
testInstrumentationRunner "org.wikipedia.WikipediaTestRunner"
vectorDrawables.useSupportLibrary = true

This file was deleted.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -5,8 +5,8 @@
<string name="hockeyapp_app_id">8d5acf26899e6d2fd16282bf89b78784</string>

<!-- The alpha build uses a different signature than beta and prod. -->
<string name="account_name">Wikimedia (Alpha)</string>
<string name="account_type">org.wikimedia.alpha</string>
<string name="account_name">DroidWiki (Alpha)</string>
<string name="account_type">de.droidwiki.alpha</string>

<string name="user_option_sync_label">Preferences (Alpha)</string>
</resources>
@@ -33,11 +33,6 @@
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />

<!-- For Nearby feature -->
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-feature android:name="android.hardware.location" tools:node="replace" android:required="false" />
<uses-feature android:name="android.hardware.location.gps" tools:node="replace" android:required="false" />
<uses-feature android:name="android.hardware.location.network" android:required="false" />
<uses-feature android:name="android.hardware.wifi" tools:node="replace" android:required="false" />

<!-- For keeping the device awake while performing background tasks, such as syncing offline articles. -->
<uses-permission android:name="android.permission.WAKE_LOCK" />
@@ -53,7 +48,7 @@
android:fullBackupContent="@xml/full_backup_rules"
tools:replace="android:allowBackup"
android:supportsRtl="true"
android:icon="@mipmap/launcher"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:name=".WikipediaApp"
android:theme="@style/AppTheme">
@@ -108,8 +103,8 @@
<!-- the following lines are merged
https://developer.android.com/training/app-links/deep-linking.html
so http and https apply to all prefixes-->
<data android:host="*.wikipedia.org" android:pathPrefix="/wiki/" android:scheme="http" />
<data android:host="*.wikipedia.org" android:pathPattern="/zh-.*" android:scheme="https" />
<data android:host="*.droidwiki.org" android:pathPrefix="/wiki/" android:scheme="http" />
<data android:host="*.droidwiki.org" android:pathPattern="/zh-.*" android:scheme="https" />
</intent-filter>
<intent-filter>
<action android:name="org.wikipedia.app_shortcut" />
@@ -274,7 +269,7 @@
android:exported="false" />

<receiver
android:icon="@mipmap/launcher"
android:icon="@mipmap/ic_launcher"
android:label="@string/widget_name_search"
android:name="org.wikipedia.widgets.WidgetProviderSearch" >
<intent-filter >
@@ -287,7 +282,7 @@
</receiver>

<receiver
android:icon="@mipmap/launcher"
android:icon="@mipmap/ic_launcher"
android:label="@string/widget_name_featured_page"
android:name="org.wikipedia.widgets.WidgetProviderFeaturedPage" >
<intent-filter >
@@ -6,7 +6,7 @@
public static final int HISTORY_FRAGMENT_LOADER_ID = 100;
public static final int RECENT_SEARCHES_FRAGMENT_LOADER_ID = 101;

public static final String WIKIPEDIA_URL = "https://wikipedia.org/";
public static final String WIKIPEDIA_URL = "https://droidwiki.org/";
public static final String PLAIN_TEXT_MIME_TYPE = "text/plain";

public static final String ACCEPT_HEADER_PREFIX = "accept: application/json; charset=utf-8; "
@@ -62,8 +62,8 @@ public static boolean supportedAuthority(@NonNull String authority) {

public static WikiSite forLanguageCode(@NonNull String languageCode) {
Uri uri = ensureScheme(Prefs.getMediaWikiBaseUri());
return new WikiSite((languageCode.isEmpty()
? "" : (languageCodeToSubdomain(languageCode) + ".")) + uri.getAuthority(),
return new WikiSite(((languageCode.isEmpty() || languageCode.equals("de"))
? "www." : (languageCodeToSubdomain(languageCode) + ".")) + uri.getAuthority(),
languageCode);
}

@@ -11,7 +11,6 @@
import org.wikipedia.feed.continuereading.ContinueReadingClient;
import org.wikipedia.feed.dataclient.FeedClient;
import org.wikipedia.feed.mainpage.MainPageClient;
import org.wikipedia.feed.random.RandomClient;
import org.wikipedia.model.EnumCode;
import org.wikipedia.model.EnumCodeMap;
import org.wikipedia.settings.Prefs;
@@ -22,62 +21,62 @@
import java.util.Map;

public enum FeedContentType implements EnumCode {
NEWS(0, R.string.view_card_news_title, R.string.feed_item_type_news, true) {
@Nullable
@Override
public FeedClient newClient(AggregatedFeedContentClient aggregatedClient, int age, boolean isOnline) {
return isEnabled() && age == 0 && isOnline ? new AggregatedFeedContentClient.InTheNews(aggregatedClient) : null;
}
},
ON_THIS_DAY(1, R.string.on_this_day_card_title, R.string.feed_item_type_on_this_day, true) {
@Nullable
@Override
public FeedClient newClient(AggregatedFeedContentClient aggregatedClient, int age, boolean isOnline) {
return isEnabled() && isOnline ? new AggregatedFeedContentClient.OnThisDayFeed(aggregatedClient) : null;
}
},
// NEWS(0, R.string.view_card_news_title, R.string.feed_item_type_news, true) {
// @Nullable
// @Override
// public FeedClient newClient(AggregatedFeedContentClient aggregatedClient, int age, boolean isOnline) {
// return isEnabled() && age == 0 && isOnline ? new AggregatedFeedContentClient.InTheNews(aggregatedClient) : null;
// }
// },
// ON_THIS_DAY(1, R.string.on_this_day_card_title, R.string.feed_item_type_on_this_day, true) {
// @Nullable
// @Override
// public FeedClient newClient(AggregatedFeedContentClient aggregatedClient, int age, boolean isOnline) {
// return isEnabled() && isOnline ? new AggregatedFeedContentClient.OnThisDayFeed(aggregatedClient) : null;
// }
// },
CONTINUE_READING(2, R.string.view_continue_reading_card_title, R.string.feed_item_type_continue_reading, false) {
@Nullable
@Override
public FeedClient newClient(AggregatedFeedContentClient aggregatedClient, int age, boolean isOnline) {
return isEnabled() ? new ContinueReadingClient() : null;
}
},
TRENDING_ARTICLES(3, R.string.most_read_list_card_title, R.string.feed_item_type_trending, true) {
@Nullable
@Override
public FeedClient newClient(AggregatedFeedContentClient aggregatedClient, int age, boolean isOnline) {
return isEnabled() && isOnline ? new AggregatedFeedContentClient.TrendingArticles(aggregatedClient) : null;
}
},
// TRENDING_ARTICLES(3, R.string.most_read_list_card_title, R.string.feed_item_type_trending, true) {
// @Nullable
// @Override
// public FeedClient newClient(AggregatedFeedContentClient aggregatedClient, int age, boolean isOnline) {
// return isEnabled() && isOnline ? new AggregatedFeedContentClient.TrendingArticles(aggregatedClient) : null;
// }
// },
MAIN_PAGE(4, R.string.view_main_page_card_title, R.string.feed_item_type_main_page, false) {
@Nullable
@Override
public FeedClient newClient(AggregatedFeedContentClient aggregatedClient, int age, boolean isOnline) {
return isEnabled() && age == 0 ? new MainPageClient() : null;
}
},
RANDOM(5, R.string.view_random_card_title, R.string.feed_item_type_randomizer, false) {
@Nullable
@Override
public FeedClient newClient(AggregatedFeedContentClient aggregatedClient, int age, boolean isOnline) {
return isEnabled() && age % 2 == 0 ? new RandomClient() : null;
}
},
FEATURED_ARTICLE(6, R.string.view_featured_article_card_title, R.string.feed_item_type_featured_article, true) {
@Nullable
@Override
public FeedClient newClient(AggregatedFeedContentClient aggregatedClient, int age, boolean isOnline) {
return isEnabled() && isOnline ? new AggregatedFeedContentClient.FeaturedArticle(aggregatedClient) : null;
}
},
FEATURED_IMAGE(7, R.string.view_featured_image_card_title, R.string.feed_item_type_featured_image, false) {
@Nullable
@Override
public FeedClient newClient(AggregatedFeedContentClient aggregatedClient, int age, boolean isOnline) {
return isEnabled() && isOnline ? new AggregatedFeedContentClient.FeaturedImage(aggregatedClient) : null;
}
},
// RANDOM(5, R.string.view_random_card_title, R.string.feed_item_type_randomizer, false) {
// @Nullable
// @Override
// public FeedClient newClient(AggregatedFeedContentClient aggregatedClient, int age, boolean isOnline) {
// return isEnabled() && age % 2 == 0 ? new RandomClient() : null;
// }
// },
// FEATURED_ARTICLE(6, R.string.view_featured_article_card_title, R.string.feed_item_type_featured_article, true) {
// @Nullable
// @Override
// public FeedClient newClient(AggregatedFeedContentClient aggregatedClient, int age, boolean isOnline) {
// return isEnabled() && isOnline ? new AggregatedFeedContentClient.FeaturedArticle(aggregatedClient) : null;
// }
// },
// FEATURED_IMAGE(7, R.string.view_featured_image_card_title, R.string.feed_item_type_featured_image, false) {
// @Nullable
// @Override
// public FeedClient newClient(AggregatedFeedContentClient aggregatedClient, int age, boolean isOnline) {
// return isEnabled() && isOnline ? new AggregatedFeedContentClient.FeaturedImage(aggregatedClient) : null;
// }
// },
BECAUSE_YOU_READ(8, R.string.view_because_you_read_card_title, R.string.feed_item_type_because_you_read, false) {
@Nullable
@Override
@@ -101,14 +101,14 @@ public int getAge() {
public int dismissCard(@NonNull Card card) {
int position = cards.indexOf(card);
if (card.type() == CardType.RANDOM) {
FeedContentType.RANDOM.setEnabled(false);
FeedContentType.saveState();
// FeedContentType.RANDOM.setEnabled(false);
// FeedContentType.saveState();
} else if (card.type() == CardType.MAIN_PAGE) {
FeedContentType.MAIN_PAGE.setEnabled(false);
FeedContentType.saveState();
} else if (card.type() == CardType.NEWS_LIST) {
FeedContentType.NEWS.setEnabled(false);
FeedContentType.saveState();
// FeedContentType.NEWS.setEnabled(false);
// FeedContentType.saveState();
} else {
addHiddenCard(card);
}
@@ -119,14 +119,14 @@ public int dismissCard(@NonNull Card card) {

public void undoDismissCard(@NonNull Card card, int position) {
if (card.type() == CardType.RANDOM) {
FeedContentType.RANDOM.setEnabled(true);
FeedContentType.saveState();
// FeedContentType.RANDOM.setEnabled(true);
// FeedContentType.saveState();
} else if (card.type() == CardType.MAIN_PAGE) {
FeedContentType.MAIN_PAGE.setEnabled(true);
FeedContentType.saveState();
} else if (card.type() == CardType.NEWS_LIST) {
FeedContentType.NEWS.setEnabled(true);
FeedContentType.saveState();
// FeedContentType.NEWS.setEnabled(true);
// FeedContentType.saveState();
} else {
unHideCard(card);
}

0 comments on commit ad12a44

Please sign in to comment.
You can’t perform that action at this time.