Compare commits

...
43 Commits
Author SHA1 Message Date
Akinwale Ariwodola a9aadbe6a8 bumpversion 0.16.10 --> 0.16.11 2020-12-13 18:08:10 +01:00
Akinwale Ariwodola f9a4b71037 fix crash error when following doesn't exist in shared user state 2020-12-13 18:07:19 +01:00
Akinwale Ariwodola 0647deb06c Merge pull request #1061 from kekkyojin/startupstage-listview
Use ListView to show startup stage errors
2020-12-12 23:16:17 +01:00
Akinwale Ariwodola b2f5fec293 make the channel filter name alphabet uppercase 2020-12-10 09:57:27 +01:00
Javi Rueda daf4e5aca2 Use ListView to show startup stage errors 2020-12-09 21:05:21 +01:00
Akinwale Ariwodola c1324efb41 bumpversion 0.16.9 --> 0.16.10 2020-12-09 11:47:58 +01:00
Akinwale Ariwodola 6221de2d3c sync notificationsDisabled states for followed channels 2020-12-09 11:31:13 +01:00
Akinwale Ariwodola 983bc68af2 Merge branch 'master' of https://github.com/lbryio/lbry-android 2020-12-09 11:00:25 +01:00
Akinwale Ariwodola f1b167693d SDK 0.86.1. is_seen vs is_read swap. Fix error condition where wallet sync starts if the wallet is not ready. 2020-12-09 10:59:25 +01:00
Akinwale Ariwodola 68ac64b534 Merge pull request #1057 from kekkyojin/sort-commentreplies
Sort replies from oldest to newest
2020-12-05 04:32:41 +01:00
Javi Rueda 6819ae46f9 Sort replies from oldest to newest 2020-12-01 04:58:48 +01:00
Akinwale Ariwodola 6c406c5a85 share_usage_data setting 2020-11-29 05:07:54 +01:00
Akinwale Ariwodola c179243d22 update dependencies 2020-11-26 00:04:37 +01:00
Akinwale Ariwodola d0f5504c80 LbryUri parsing improvements. Remove duplicate code. 2020-11-15 09:11:50 +01:00
Akinwale Ariwodola 896c566a02 Merge pull request #1045 from kekkyojin/open-file-external
Offer opening unsupported filetypes with external app
2020-11-13 15:42:59 +01:00
Javi Rueda da9352cc68 Offer opening unsupported filetypes with external app 2020-10-27 14:28:15 +01:00
Akinwale Ariwodola b8d2375e20 Merge pull request #1044 from ycohen-dev/fix_issue_1043
Fix floating wallet/rewards bar for RTL layout
2020-10-23 13:25:07 +01:00
Akinwale Ariwodola dd52ff9d07 Merge pull request #1033 from kekkyojin/md-text-rendering
Fix for text not rendering after # in markdown
2020-10-23 13:23:15 +01:00
yuval d9891f8a8a Floating wallet balance/rewards now visible in RTL layout
(Fix issue #1043)
2020-10-22 22:22:44 +03:00
Akinwale Ariwodola ea5fe6842d Merge pull request #1041 from ycohen-dev/fix_issue_1040
fix issue 1040
2020-10-21 00:15:36 +01:00
Akinwale Ariwodola fc649187df Merge pull request #1039 from ycohen-dev/fix_issue_1038
fix issue 1038
2020-10-21 00:14:15 +01:00
yuval b0f7c41885 fix issue 1040
Transaction amount text Direction changed to LTR.
Transaction amount pinned to end of view
2020-10-17 22:18:14 +03:00
yuval 45935717c8 fix issue 1038
Replaced gravity pinning to "end" instead of "right"
Pinned claim id which could be in rtl and ltr scripts to the start of the layout
2020-10-16 23:40:28 +03:00
Akinwale Ariwodola ac5e666369 bumpversion 0.16.8 --> 0.16.9 2020-10-16 06:58:57 +01:00
Akinwale Ariwodola ffeb72a383 Publish mature tags. String resource updates. 2020-10-16 06:53:08 +01:00
Akinwale Ariwodola 0ec09d751c Merge pull request #1036 from ycohen-dev/fix_issue_1034
Fix issue #1034
2020-10-16 06:39:45 +01:00
Akinwale Ariwodola b8e4fcff92 Merge pull request #1037 from lbryio/follow-text
add follow text beside follow icon
2020-10-16 06:37:50 +01:00
Akinwale Ariwodola b79f0f4820 add follow text beside follow icon 2020-10-16 06:36:36 +01:00
yuval a1cd58a214 Fix issue #1034
Hide notifications when entering PiP mode
2020-10-16 00:11:08 +03:00
Javi Rueda cfca8facbe Use '%23' instead of '#' when rendering #hashtag style text from markdown 2020-10-15 01:49:53 +02:00
Akinwale Ariwodola 066a0a099c Merge pull request #1032 from lbryio/wallet-balance-page
use credits icon on wallet balance page
2020-10-14 15:33:25 +01:00
Akinwale Ariwodola afeee2e5df use credits icon on wallet balance page 2020-10-14 15:30:59 +01:00
Akinwale Ariwodola 76036acfc7 Merge branch 'master' of https://github.com/lbryio/lbry-android 2020-10-14 15:17:35 +01:00
Akinwale Ariwodola 897bfdaffd fix build error 2020-10-14 15:16:45 +01:00
Akinwale Ariwodola 7475ae323c Merge pull request #1031 from ycohen-dev/fix_issue_1030
Fix issue #1030
2020-10-14 15:12:34 +01:00
Akinwale Ariwodola faf7f3ccbf make credits translatable 2020-10-14 15:11:36 +01:00
Akinwale Ariwodola 4940d1ca33 Merge branch 'master' of https://github.com/lbryio/lbry-android 2020-10-14 15:10:25 +01:00
Akinwale Ariwodola 3d48fa5741 also check pending when checking if item is a placeholder 2020-10-14 15:09:59 +01:00
yuval f9887cffae Fix issue #1030
Dismiss all active dialog fragment when entering PiP mode
So that PiP window contain the video only
2020-10-13 23:17:58 +03:00
Akinwale Ariwodola 6644907665 Merge pull request #1027 from ycohen-dev/fix_issue_1025
Fix issue #1025
2020-10-12 19:25:48 +01:00
Akinwale Ariwodola 5f850685d6 bumpversion 0.16.7 --> 0.16.8 2020-10-12 11:48:24 +01:00
Akinwale Ariwodola 5f9674e49c do not open lbry.*/$/verify links in the app 2020-10-12 11:47:45 +01:00
yuval 0d185c6db3 Fix issue #1025
Increased size of currency selection spinner in publish form fragment
Now spinner is in proper size to display "LBRY Credits" default value
2020-10-10 16:58:29 +03:00
30 changed files with 561 additions and 389 deletions

No files matched your search

+12 -12
View File
@@ -16,8 +16,8 @@ android {
applicationId "io.lbry.browser"
minSdkVersion 21
targetSdkVersion 29
versionCode 1607
versionName "0.16.7"
versionCode 1611
versionName "0.16.11"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
@@ -80,13 +80,13 @@ dependencies {
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'com.google.android.material:material:1.3.0-alpha01'
implementation "androidx.cardview:cardview:1.0.0"
implementation 'androidx.constraintlayout:constraintlayout:2.0.1'
implementation 'androidx.navigation:navigation-fragment:2.3.0'
implementation 'androidx.navigation:navigation-ui:2.3.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
implementation 'androidx.navigation:navigation-fragment:2.3.1'
implementation 'androidx.navigation:navigation-ui:2.3.1'
implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
implementation 'androidx.localbroadcastmanager:localbroadcastmanager:1.0.0'
implementation 'androidx.preference:preference:1.1.1'
implementation 'androidx.webkit:webkit:1.3.0-alpha03'
implementation 'androidx.webkit:webkit:1.4.0-rc01'
implementation 'androidx.camera:camera-core:1.0.0-beta03'
implementation 'androidx.camera:camera-camera2:1.0.0-beta03'
implementation 'androidx.camera:camera-lifecycle:1.0.0-beta03'
@@ -96,12 +96,12 @@ dependencies {
implementation 'com.github.bumptech.glide:glide:4.11.0'
implementation 'com.squareup.okhttp3:okhttp:4.4.1'
implementation 'com.google.firebase:firebase-analytics:17.5.0'
implementation 'com.google.android.gms:play-services-base:17.4.0'
implementation 'com.google.firebase:firebase-messaging:20.3.0'
implementation 'com.google.firebase:firebase-analytics:18.0.0'
implementation 'com.google.android.gms:play-services-base:17.5.0'
implementation 'com.google.firebase:firebase-messaging:21.0.0'
implementation 'com.google.oauth-client:google-oauth-client:1.30.4'
implementation 'com.android.billingclient:billing:3.0.1'
implementation 'com.android.billingclient:billing:3.0.2'
implementation 'com.google.code.gson:gson:2.8.6'
implementation 'com.google.android.exoplayer:exoplayer-core:2.11.4'
@@ -130,8 +130,8 @@ dependencies {
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
__32bitImplementation 'io.lbry:lbrysdk32:0.82.0'
__64bitImplementation 'io.lbry:lbrysdk64:0.82.0'
__32bitImplementation 'io.lbry:lbrysdk32:0.86.1'
__64bitImplementation 'io.lbry:lbrysdk64:0.86.1'
}
apply plugin: 'com.google.gms.google-services'
+12 -4
View File
@@ -68,10 +68,18 @@
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<data android:scheme="https" android:host="open.lbry.com"/>
<data android:scheme="https" android:host="lbry.tv"/>
<data android:scheme="https" android:host="lbry.lat"/>
<data android:scheme="https" android:host="lbry.fr"/>
<data android:scheme="https" android:host="lbry.in"/>
<data android:scheme="https" android:host="lbry.tv" android:pathPattern="/..*/*" />
<data android:scheme="https" android:host="lbry.tv" android:pathPattern="/.*:.*" />
<data android:scheme="https" android:host="lbry.tv" android:pathPattern="/.*#.*" />
<data android:scheme="https" android:host="lbry.lat" android:pathPattern="/..*/*" />
<data android:scheme="https" android:host="lbry.lat" android:pathPattern="/.*:.*" />
<data android:scheme="https" android:host="lbry.lat" android:pathPattern="/.*#.*" />
<data android:scheme="https" android:host="lbry.fr" android:pathPattern="/..*/*" />
<data android:scheme="https" android:host="lbry.fr" android:pathPattern="/.*:.*" />
<data android:scheme="https" android:host="lbry.fr" android:pathPattern="/.*#.*" />
<data android:scheme="https" android:host="lbry.in" android:pathPattern="/..*/*" />
<data android:scheme="https" android:host="lbry.in" android:pathPattern="/.*:.*" />
<data android:scheme="https" android:host="lbry.in" android:pathPattern="/.*#.*" />
<category android:name="android.intent.category.BROWSABLE" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
@@ -46,6 +46,7 @@ import android.view.inputmethod.InputMethodManager;
import android.webkit.WebView;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.ListView;
import android.widget.TextView;
import android.widget.Toast;
@@ -70,8 +71,7 @@ import com.google.android.gms.cast.framework.CastContext;
import com.google.android.gms.tasks.OnCompleteListener;
import com.google.android.gms.tasks.Task;
import com.google.android.material.snackbar.Snackbar;
import com.google.firebase.iid.FirebaseInstanceId;
import com.google.firebase.iid.InstanceIdResult;
import com.google.firebase.messaging.FirebaseMessaging;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
@@ -92,6 +92,7 @@ import androidx.core.view.GravityCompat;
import androidx.core.view.OnApplyWindowInsetsListener;
import androidx.core.view.ViewCompat;
import androidx.core.view.WindowInsetsCompat;
import androidx.fragment.app.DialogFragment;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;
import androidx.fragment.app.FragmentTransaction;
@@ -113,7 +114,9 @@ import org.json.JSONObject;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.InputStreamReader;
import java.io.PrintStream;
import java.net.ConnectException;
import java.net.URI;
import java.text.DecimalFormat;
@@ -134,6 +137,7 @@ import javax.net.ssl.SSLParameters;
import io.lbry.browser.adapter.NavigationMenuAdapter;
import io.lbry.browser.adapter.NotificationListAdapter;
import io.lbry.browser.adapter.StartupStageAdapter;
import io.lbry.browser.adapter.UrlSuggestionListAdapter;
import io.lbry.browser.data.DatabaseHelper;
import io.lbry.browser.dialog.ContentScopeDialogFragment;
@@ -153,6 +157,7 @@ import io.lbry.browser.listener.WalletBalanceListener;
import io.lbry.browser.model.Claim;
import io.lbry.browser.model.ClaimCacheKey;
import io.lbry.browser.model.NavMenuItem;
import io.lbry.browser.model.StartupStage;
import io.lbry.browser.model.Tag;
import io.lbry.browser.model.UrlSuggestion;
import io.lbry.browser.model.WalletBalance;
@@ -339,6 +344,7 @@ public class MainActivity extends AppCompatActivity implements SdkStatusListener
public static final String PREFERENCE_KEY_KEEP_SDK_BACKGROUND = "io.lbry.browser.preference.other.KeepSdkInBackground";
public static final String PREFERENCE_KEY_PARTICIPATE_DATA_NETWORK = "io.lbry.browser.preference.other.ParticipateInDataNetwork";
public static final String PREFERENCE_KEY_SEND_BUFFERING_EVENTS = "io.lbry.browser.preference.other.SendBufferingEvents";
public static final String PREFERENCE_KEY_SHARE_USAGE_DATA = "io.lbry.browser.preference.other.ShareUsageData";
// Internal flags / setting preferences
public static final String PREFERENCE_KEY_INTERNAL_SKIP_WALLET_ACCOUNT = "io.lbry.browser.preference.internal.WalletSkipAccount";
@@ -435,14 +441,13 @@ public class MainActivity extends AppCompatActivity implements SdkStatusListener
LbryAnalytics.init(this);
try {
FirebaseInstanceId.getInstance().getInstanceId().addOnCompleteListener(new OnCompleteListener<InstanceIdResult>() {
FirebaseMessaging.getInstance().getToken().addOnCompleteListener(new OnCompleteListener<String>() {
@Override
public void onComplete(Task<InstanceIdResult> task) {
public void onComplete(@NonNull Task<String> task) {
if (!task.isSuccessful()) {
return;
}
// Get new Instance ID token
firebaseMessagingToken = task.getResult().getToken();
firebaseMessagingToken = task.getResult();
}
});
} catch (IllegalStateException ex) {
@@ -514,7 +519,7 @@ public class MainActivity extends AppCompatActivity implements SdkStatusListener
// setup uri bar
setupUriBar();
initNotificationsPage();
loadUnreadNotificationsCount();
loadUnseenNotificationsCount();
// other
pendingSyncSetQueue = new ArrayList<>();
@@ -1031,7 +1036,9 @@ public class MainActivity extends AppCompatActivity implements SdkStatusListener
findViewById(R.id.global_now_playing_card).setVisibility(View.GONE);
//findViewById(R.id.global_sdk_initializing_status).setVisibility(View.GONE);
findViewById(R.id.app_bar_main_container).setFitsSystemWindows(true);
hideNotifications();
hideActionBar();
dismissActiveDialogs();
for (PIPModeListener listener : pipModeListeners) {
listener.onEnterPIPMode();
@@ -1044,6 +1051,15 @@ public class MainActivity extends AppCompatActivity implements SdkStatusListener
pipPlayerContainer.setVisibility(View.VISIBLE);
playerReassigned = true;
}
private void dismissActiveDialogs() {
for( Fragment fragment: getSupportFragmentManager().getFragments() ){
if (fragment instanceof DialogFragment){
((DialogFragment) fragment).dismiss();
}
}
}
private void renderFullMode() {
if (!inFullscreenMode) {
showActionBar();
@@ -1812,6 +1828,7 @@ public class MainActivity extends AppCompatActivity implements SdkStatusListener
}
//findViewById(R.id.global_sdk_initializing_status).setVisibility(View.GONE);
checkAndEnableShareUsageData();
scheduleWalletBalanceUpdate();
scheduleWalletSyncTask();
@@ -2435,7 +2452,7 @@ public class MainActivity extends AppCompatActivity implements SdkStatusListener
}
if (notificationListAdapter != null) {
markNotificationsRead();
markNotificationsSeen();
}
}
@@ -2444,17 +2461,17 @@ public class MainActivity extends AppCompatActivity implements SdkStatusListener
findViewById(R.id.notifications_container).setVisibility(View.GONE);
}
private void markNotificationsRead() {
private void markNotificationsSeen() {
List<LbryNotification> all = notificationListAdapter != null ? notificationListAdapter.getItems() : null;
if (all != null) {
List<Long> unreadIds = new ArrayList<>();
List<Long> unseenIds = new ArrayList<>();
for (LbryNotification notification : all) {
if (!notification.isRead() && notification.getRemoteId() > 0) {
unreadIds.add(notification.getRemoteId());
if (!notification.isSeen() && notification.getRemoteId() > 0) {
unseenIds.add(notification.getRemoteId());
}
}
if (unreadIds.size() > 0) {
NotificationUpdateTask task = new NotificationUpdateTask(unreadIds, true);
if (unseenIds.size() > 0) {
NotificationUpdateTask task = new NotificationUpdateTask(unseenIds, true);
task.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
}
}
@@ -2464,14 +2481,14 @@ public class MainActivity extends AppCompatActivity implements SdkStatusListener
protected Void doInBackground(Void... params) {
try {
SQLiteDatabase db = dbHelper.getWritableDatabase();
DatabaseHelper.markNotificationsRead(db);
DatabaseHelper.markNotificationsSeen(db);
} catch (Exception ex) {
// pass
}
return null;
}
protected void onPostExecute(Void result) {
loadUnreadNotificationsCount();
loadUnseenNotificationsCount();
}
}).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
}
@@ -2728,22 +2745,10 @@ public class MainActivity extends AppCompatActivity implements SdkStatusListener
actionBar.show();
}
}
private void renderStartupFailed(Map<Integer, Boolean> startupStages) {
Map<Integer, Integer> startupStageIconIds = new HashMap<>();
startupStageIconIds.put(STARTUP_STAGE_INSTALL_ID_LOADED, R.id.startup_stage_icon_install_id);
startupStageIconIds.put(STARTUP_STAGE_KNOWN_TAGS_LOADED, R.id.startup_stage_icon_known_tags);
startupStageIconIds.put(STARTUP_STAGE_EXCHANGE_RATE_LOADED, R.id.startup_stage_icon_exchange_rate);
startupStageIconIds.put(STARTUP_STAGE_USER_AUTHENTICATED, R.id.startup_stage_icon_user_authenticated);
startupStageIconIds.put(STARTUP_STAGE_NEW_INSTALL_DONE, R.id.startup_stage_icon_install_new);
startupStageIconIds.put(STARTUP_STAGE_SUBSCRIPTIONS_LOADED, R.id.startup_stage_icon_subscriptions_loaded);
startupStageIconIds.put(STARTUP_STAGE_SUBSCRIPTIONS_RESOLVED, R.id.startup_stage_icon_subscriptions_resolved);
for (Integer key : startupStages.keySet()) {
boolean stageDone = startupStages.get(key);
ImageView icon = findViewById(startupStageIconIds.get(key));
icon.setImageResource(stageDone ? R.drawable.ic_check : R.drawable.ic_close);
icon.setColorFilter(stageDone ? Color.WHITE : Color.RED);
}
private void renderStartupFailed(List<StartupStage> startupStages) {
ListView listView = findViewById(R.id.startup_stage_error_listview);
StartupStageAdapter adapter = new StartupStageAdapter(this, startupStages);
listView.setAdapter(adapter);
findViewById(R.id.splash_view_loading_container).setVisibility(View.GONE);
findViewById(R.id.splash_view_error_container).setVisibility(View.VISIBLE);
@@ -2756,16 +2761,16 @@ public class MainActivity extends AppCompatActivity implements SdkStatusListener
// perform some tasks before launching
(new AsyncTask<Void, Void, Boolean>() {
private Map<Integer, Boolean> startupStages = new HashMap<>();
private final List<StartupStage> startupStages = new ArrayList<>(7);
private void initStartupStages() {
startupStages.put(STARTUP_STAGE_INSTALL_ID_LOADED, false);
startupStages.put(STARTUP_STAGE_KNOWN_TAGS_LOADED, false);
startupStages.put(STARTUP_STAGE_EXCHANGE_RATE_LOADED, false);
startupStages.put(STARTUP_STAGE_USER_AUTHENTICATED, false);
startupStages.put(STARTUP_STAGE_NEW_INSTALL_DONE, false);
startupStages.put(STARTUP_STAGE_SUBSCRIPTIONS_LOADED, false);
startupStages.put(STARTUP_STAGE_SUBSCRIPTIONS_RESOLVED, false);
startupStages.add(new StartupStage(STARTUP_STAGE_INSTALL_ID_LOADED, false));
startupStages.add(new StartupStage(STARTUP_STAGE_KNOWN_TAGS_LOADED, false));
startupStages.add(new StartupStage(STARTUP_STAGE_EXCHANGE_RATE_LOADED, false));
startupStages.add(new StartupStage(STARTUP_STAGE_USER_AUTHENTICATED, false));
startupStages.add(new StartupStage(STARTUP_STAGE_NEW_INSTALL_DONE, false));
startupStages.add(new StartupStage(STARTUP_STAGE_SUBSCRIPTIONS_LOADED, false));
startupStages.add(new StartupStage(STARTUP_STAGE_SUBSCRIPTIONS_RESOLVED, false));
}
protected void onPreExecute() {
hideActionBar();
@@ -2785,26 +2790,26 @@ public class MainActivity extends AppCompatActivity implements SdkStatusListener
String installId = reader.readLine();
if (Helper.isNullOrEmpty(installId)) {
// no install_id found (first run didn't start the sdk successfully?)
startupStages.put(STARTUP_STAGE_INSTALL_ID_LOADED, false);
startupStages.set(STARTUP_STAGE_INSTALL_ID_LOADED - 1, new StartupStage(STARTUP_STAGE_INSTALL_ID_LOADED, false));
return false;
}
Lbry.INSTALLATION_ID = installId;
startupStages.put(STARTUP_STAGE_INSTALL_ID_LOADED, true);
startupStages.set(STARTUP_STAGE_INSTALL_ID_LOADED - 1, new StartupStage(STARTUP_STAGE_INSTALL_ID_LOADED, true));
SQLiteDatabase db = dbHelper.getReadableDatabase();
List<Tag> fetchedTags = DatabaseHelper.getTags(db);
Lbry.knownTags = Helper.mergeKnownTags(fetchedTags);
Collections.sort(Lbry.knownTags, new Tag());
Lbry.followedTags = Helper.filterFollowedTags(Lbry.knownTags);
startupStages.put(STARTUP_STAGE_KNOWN_TAGS_LOADED, true);
startupStages.set(STARTUP_STAGE_KNOWN_TAGS_LOADED - 1, new StartupStage(STARTUP_STAGE_KNOWN_TAGS_LOADED, true));
// load the exchange rate
Lbryio.loadExchangeRate();
if (Lbryio.LBCUSDRate == 0) {
return false;
}
startupStages.put(STARTUP_STAGE_EXCHANGE_RATE_LOADED, true);
startupStages.set(STARTUP_STAGE_EXCHANGE_RATE_LOADED - 1, new StartupStage(STARTUP_STAGE_EXCHANGE_RATE_LOADED, true));
try {
Lbryio.authenticate(context);
@@ -2816,10 +2821,10 @@ public class MainActivity extends AppCompatActivity implements SdkStatusListener
if (Lbryio.currentUser == null) {
throw new Exception("Did not retrieve authenticated user.");
}
startupStages.put(STARTUP_STAGE_USER_AUTHENTICATED, true);
startupStages.set(STARTUP_STAGE_USER_AUTHENTICATED - 1, new StartupStage(STARTUP_STAGE_USER_AUTHENTICATED, true));
Lbryio.newInstall(context);
startupStages.put(STARTUP_STAGE_NEW_INSTALL_DONE, true);
startupStages.set(STARTUP_STAGE_NEW_INSTALL_DONE - 1, new StartupStage(STARTUP_STAGE_NEW_INSTALL_DONE, true));
// (light) fetch subscriptions
if (Lbryio.subscriptions.size() == 0) {
@@ -2840,7 +2845,7 @@ public class MainActivity extends AppCompatActivity implements SdkStatusListener
subUrls.add(url.toString());
}
Lbryio.subscriptions = subscriptions;
startupStages.put(STARTUP_STAGE_SUBSCRIPTIONS_LOADED, true);
startupStages.set(STARTUP_STAGE_SUBSCRIPTIONS_LOADED - 1, new StartupStage(STARTUP_STAGE_SUBSCRIPTIONS_LOADED, true));
// resolve subscriptions
if (subUrls.size() > 0 && Lbryio.cacheResolvedSubscriptions.size() != Lbryio.subscriptions.size()) {
@@ -2848,15 +2853,15 @@ public class MainActivity extends AppCompatActivity implements SdkStatusListener
Lbryio.cacheResolvedSubscriptions = resolvedSubs;
}
// if no exceptions occurred here, subscriptions have been loaded and resolved
startupStages.put(STARTUP_STAGE_SUBSCRIPTIONS_RESOLVED, true);
startupStages.set(STARTUP_STAGE_SUBSCRIPTIONS_RESOLVED - 1, new StartupStage(STARTUP_STAGE_SUBSCRIPTIONS_RESOLVED, true));
} else {
// user has not subscribed to anything
startupStages.put(STARTUP_STAGE_SUBSCRIPTIONS_LOADED, true);
startupStages.put(STARTUP_STAGE_SUBSCRIPTIONS_RESOLVED, true);
startupStages.set(STARTUP_STAGE_SUBSCRIPTIONS_LOADED - 1, new StartupStage(STARTUP_STAGE_SUBSCRIPTIONS_LOADED, true));
startupStages.set(STARTUP_STAGE_SUBSCRIPTIONS_RESOLVED - 1, new StartupStage(STARTUP_STAGE_SUBSCRIPTIONS_RESOLVED, true));
}
} else {
startupStages.put(STARTUP_STAGE_SUBSCRIPTIONS_LOADED, true);
startupStages.put(STARTUP_STAGE_SUBSCRIPTIONS_RESOLVED, true);
startupStages.set(STARTUP_STAGE_SUBSCRIPTIONS_LOADED - 1, new StartupStage(STARTUP_STAGE_SUBSCRIPTIONS_LOADED, true));
startupStages.set(STARTUP_STAGE_SUBSCRIPTIONS_RESOLVED - 1, new StartupStage(STARTUP_STAGE_SUBSCRIPTIONS_RESOLVED, true));
}
} catch (Exception ex) {
// nopecd
@@ -3471,7 +3476,7 @@ public class MainActivity extends AppCompatActivity implements SdkStatusListener
task.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
}
private void displayUnreadNotificationCount(int count) {
private void displayUnseenNotificationCount(int count) {
String text = count > 99 ? "99+" : String.valueOf(count);
TextView badge = findViewById(R.id.notifications_badge_count);
@@ -3479,19 +3484,19 @@ public class MainActivity extends AppCompatActivity implements SdkStatusListener
badge.setText(text);
}
private void loadUnreadNotificationsCount() {
private void loadUnseenNotificationsCount() {
(new AsyncTask<Void, Void, Integer>() {
@Override
protected Integer doInBackground(Void... params) {
try {
SQLiteDatabase db = dbHelper.getReadableDatabase();
return DatabaseHelper.getUnreadNotificationsCount(db);
return DatabaseHelper.getUnseenNotificationsCount(db);
} catch (Exception ex) {
return 0;
}
}
protected void onPostExecute(Integer count) {
displayUnreadNotificationCount(count);
displayUnseenNotificationCount(count);
}
}).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
}
@@ -3503,10 +3508,10 @@ public class MainActivity extends AppCompatActivity implements SdkStatusListener
public void onSuccess(List<LbryNotification> notifications) {
remoteNotifcationsLastLoaded = new Date();
loadUnreadNotificationsCount();
loadUnseenNotificationsCount();
loadLocalNotifications();
if (markRead && findViewById(R.id.notifications_container).getVisibility() == View.VISIBLE) {
markNotificationsRead();
markNotificationsSeen();
}
if (notificationsSwipeContainer != null) {
@@ -3547,7 +3552,7 @@ public class MainActivity extends AppCompatActivity implements SdkStatusListener
protected void onPostExecute(List<LbryNotification> notifications) {
findViewById(R.id.notification_list_empty_container).setVisibility(notifications.size() == 0 ? View.VISIBLE : View.GONE);
findViewById(R.id.notifications_progress).setVisibility(View.GONE);
loadUnreadNotificationsCount();
loadUnseenNotificationsCount();
if (notificationListAdapter == null) {
notificationListAdapter = new NotificationListAdapter(notifications, MainActivity.this);
@@ -3604,7 +3609,7 @@ public class MainActivity extends AppCompatActivity implements SdkStatusListener
return null;
}
protected void onPostExecute() {
loadUnreadNotificationsCount();
loadUnseenNotificationsCount();
}
}).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
}
@@ -3718,6 +3723,51 @@ public class MainActivity extends AppCompatActivity implements SdkStatusListener
}
}
private void checkAndEnableShareUsageData() {
final SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(this);
boolean shareUsageData = sp.getBoolean(PREFERENCE_KEY_SHARE_USAGE_DATA, false);
if (shareUsageData) {
return;
}
(new AsyncTask<Void, Void, Void>() {
protected Void doInBackground(Void... params) {
PrintStream out = null;
try {
String fileContent = "true";
String path = String.format("%s/sud", Utils.getAppInternalStorageDir(MainActivity.this));
out = new PrintStream(new FileOutputStream(path));
out.print(fileContent);
} catch (Exception ex) {
// pass
} finally {
Helper.closeCloseable(out);
}
return null;
}
protected void onPostExecute(Void result) {
updateSdkSetting("share_usage_data", true);
sp.edit().putBoolean(PREFERENCE_KEY_SHARE_USAGE_DATA, true).apply();
}
}).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
}
public void updateSdkSetting(String key, Object value) {
(new Thread() {
public void run() {
Map<String, Object> params = new HashMap<>();
params.put(key, value);
try {
Lbry.parseResponse(Lbry.apiCall("settings_set", params, Lbry.SDK_CONNECTION_STRING));
} catch (Exception ex) {
// pass
Log.d(TAG, ex.getMessage(), ex);
}
}
}).start();
}
public interface BackPressInterceptor {
boolean onBackPressed();
}
@@ -31,6 +31,7 @@ import java.util.Arrays;
import java.util.List;
import io.lbry.browser.adapter.VerificationPagerAdapter;
import io.lbry.browser.listener.SdkStatusListener;
import io.lbry.browser.listener.SignInListener;
import io.lbry.browser.listener.WalletSyncListener;
import io.lbry.browser.model.lbryinc.RewardVerified;
@@ -48,6 +49,7 @@ public class VerificationActivity extends FragmentActivity implements SignInList
public static final int VERIFICATION_FLOW_REWARDS = 2;
public static final int VERIFICATION_FLOW_WALLET = 3;
private List<SdkStatusListener> sdkStatusListeners;
private BillingClient billingClient;
private BroadcastReceiver sdkReceiver;
private String email;
@@ -105,6 +107,8 @@ public class VerificationActivity extends FragmentActivity implements SignInList
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
sdkStatusListeners = new ArrayList<>();
signedIn = Lbryio.isSignedIn();
Intent intent = getIntent();
if (intent != null) {
@@ -126,11 +130,18 @@ public class VerificationActivity extends FragmentActivity implements SignInList
IntentFilter filter = new IntentFilter();
filter.addAction(LbrynetService.ACTION_STOP_SERVICE);
filter.addAction(MainActivity.ACTION_SDK_READY);
sdkReceiver = new BroadcastReceiver() {
@Override
public void onReceive(Context context, Intent intent) {
String action = intent.getAction();
if (LbrynetService.ACTION_STOP_SERVICE.equals(action)) {
if (MainActivity.ACTION_SDK_READY.equals(action)) {
for (SdkStatusListener listener : sdkStatusListeners) {
if (listener != null) {
listener.onSdkReady();
}
}
} else if (LbrynetService.ACTION_STOP_SERVICE.equals(action)) {
finish();
}
}
@@ -436,4 +447,14 @@ public class VerificationActivity extends FragmentActivity implements SignInList
Helper.unregisterReceiver(sdkReceiver, this);
super.onDestroy();
}
public void addSdkStatusListener(SdkStatusListener listener) {
if (!sdkStatusListeners.contains(listener)) {
sdkStatusListeners.add(listener);
}
}
public void removeSdkStatusListener(SdkStatusListener listener) {
sdkStatusListeners.remove(listener);
}
}
@@ -101,7 +101,7 @@ public class ChannelFilterListAdapter extends RecyclerView.Adapter<ChannelFilter
}
vh.alphaContainer.setVisibility(claim.isPlaceholder() || Helper.isNullOrEmpty(thumbnailUrl) ? View.VISIBLE : View.GONE);
vh.thumbnailView.setVisibility(claim.isPlaceholder() || Helper.isNullOrEmpty(thumbnailUrl) ? View.GONE : View.VISIBLE);
vh.alphaView.setText(claim.isPlaceholder() ? null : claim.getName() != null ? claim.getName().substring(1, 2) : "");
vh.alphaView.setText(claim.isPlaceholder() ? null : claim.getName() != null ? claim.getName().substring(1, 2).toUpperCase() : "");
int bgColor = Helper.generateRandomColorForValue(claim.getClaimId());
Helper.setIconViewBackgroundColor(vh.alphaContainer, bgColor, claim.isPlaceholder(), context);
@@ -430,7 +430,7 @@ public class ClaimListAdapter extends RecyclerView.Adapter<ClaimListAdapter.View
Helper.setViewVisibility(vh.loadingTextPlaceholder2, item.isLoadingPlaceholder() ? View.VISIBLE : View.GONE);
Helper.setViewVisibility(vh.titleView, !item.isLoadingPlaceholder() ? View.VISIBLE : View.GONE);
Helper.setViewVisibility(vh.publisherView, !item.isLoadingPlaceholder() ? View.VISIBLE : View.GONE);
Helper.setViewVisibility(vh.publishTimeView, !item.isLoadingPlaceholder() ? View.VISIBLE : View.GONE);
Helper.setViewVisibility(vh.publishTimeView, !item.isLoadingPlaceholder() && !isPending ? View.VISIBLE : View.GONE);
if (type == VIEW_TYPE_FEATURED && item.isUnresolved()) {
vh.durationView.setVisibility(View.GONE);
@@ -0,0 +1,68 @@
package io.lbry.browser.adapter;
import android.content.Context;
import android.graphics.Color;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.ImageView;
import android.widget.TextView;
import java.util.List;
import io.lbry.browser.R;
import io.lbry.browser.model.StartupStage;
public class StartupStageAdapter extends BaseAdapter {
private final List<StartupStage> list;
private final LayoutInflater inflater;
private final String[] stagesString;
public StartupStageAdapter(Context ctx, List<StartupStage> rows) {
this.list = rows;
this.inflater = LayoutInflater.from(ctx);
stagesString = new String[7];
stagesString[0] = ctx.getResources().getString(R.string.installation_id_loaded);
stagesString[1] = ctx.getResources().getString(R.string.known_tags_loaded);
stagesString[2] = ctx.getResources().getString(R.string.exchange_rate_loaded);
stagesString[3] = ctx.getResources().getString(R.string.user_authenticated);
stagesString[4] = ctx.getResources().getString(R.string.installation_registered);
stagesString[5] = ctx.getResources().getString(R.string.subscriptions_loaded);
stagesString[6] = ctx.getResources().getString(R.string.subscriptions_resolved);
}
@Override
public int getCount() {
return list.size();
}
@Override
public Object getItem(int i) {
return list.get(i);
}
@Override
public long getItemId(int i) {
return i;
}
@Override
public View getView(int i, View view, ViewGroup viewGroup) {
if (view == null) {
view = inflater.inflate(R.layout.list_item_startupstage, viewGroup, false);
ImageView iconView = view.findViewById(R.id.startup_stage_icon);
TextView textView = view.findViewById(R.id.startup_stage_text);
StartupStage item = (StartupStage) getItem(i);
iconView.setImageResource(item.stageDone ? R.drawable.ic_check : R.drawable.ic_close);
iconView.setColorFilter(item.stageDone ? Color.WHITE : Color.RED);
textView.setText(stagesString[item.stage - 1]);
}
return view;
}
}
@@ -124,7 +124,9 @@ public class DatabaseHelper extends SQLiteOpenHelper {
private static final String SQL_INSERT_NOTIFICATION = "REPLACE INTO notifications (remote_id, author_url, title, description, rule, target_url, is_read, is_seen, timestamp) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)";
private static final String SQL_GET_NOTIFICATIONS = "SELECT id, remote_id, author_url, title, description, rule, target_url, is_read, is_seen, timestamp FROM notifications ORDER BY timestamp DESC LIMIT 500";
private static final String SQL_GET_UNREAD_NOTIFICATIONS_COUNT = "SELECT COUNT(id) FROM notifications WHERE is_read <> 1";
private static final String SQL_GET_UNSEEN_NOTIFICATIONS_COUNT = "SELECT COUNT(id) FROM notifications WHERE is_seen <> 1";
private static final String SQL_MARK_NOTIFICATIONS_READ = "UPDATE notifications SET is_read = 1 WHERE is_read = 0";
private static final String SQL_MARK_NOTIFICATIONS_SEEN = "UPDATE notifications SET is_seen = 1 WHERE is_seen = 0";
private static final String SQL_MARK_NOTIFICATION_READ_AND_SEEN = "UPDATE notifications SET is_read = 1, is_seen = 1 WHERE id = ?";
private static final String SQL_INSERT_SHUFFLE_WATCHED = "REPLACE INTO shuffle_watched (claim_id) VALUES (?)";
@@ -417,6 +419,22 @@ public class DatabaseHelper extends SQLiteOpenHelper {
}
return count;
}
public static int getUnseenNotificationsCount(SQLiteDatabase db) {
int count = 0;
Cursor cursor = null;
try {
cursor = db.rawQuery(SQL_GET_UNSEEN_NOTIFICATIONS_COUNT, null);
if (cursor.moveToNext()) {
count = cursor.getInt(0);
}
} finally {
Helper.closeCursor(cursor);
}
return count;
}
public static void markNotificationsSeen(SQLiteDatabase db) {
db.execSQL(SQL_MARK_NOTIFICATIONS_SEEN);
}
public static void markNotificationsRead(SQLiteDatabase db) {
db.execSQL(SQL_MARK_NOTIFICATIONS_READ);
}
@@ -11,7 +11,7 @@ import io.lbry.browser.utils.Helper;
import lombok.Data;
@Data
public class Comment {
public class Comment implements Comparable<Comment> {
public static final double LBC_COST = 1;
public static final int MAX_LENGTH = 2000;
@@ -66,4 +66,9 @@ public class Comment {
return null;
}
}
@Override
public int compareTo(Comment comment) {
return (int)(this.getTimestamp() - comment.getTimestamp());
}
}
@@ -0,0 +1,11 @@
package io.lbry.browser.model;
public class StartupStage {
public Integer stage;
public Boolean stageDone;
public StartupStage(Integer stage, Boolean stageDone) {
this.stage = stage;
this.stageDone = stageDone;
}
}
@@ -8,6 +8,7 @@ import org.json.JSONArray;
import org.json.JSONObject;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -67,6 +68,9 @@ public class CommentListTask extends AsyncTask<Void, Void, List<Comment>> {
}
}
// Sort all replies from oldest to newest at once
Collections.sort(children);
for (Comment child : children) {
for (Comment parent : comments) {
if (parent.getId().equalsIgnoreCase(child.getParentId())) {
@@ -15,25 +15,25 @@ public class NotificationUpdateTask extends AsyncTask<Void, Void, Boolean> {
private List<Long> ids;
private boolean seen;
private boolean read;
private boolean updateSeen;
private boolean updateRead;
public NotificationUpdateTask(List<Long> ids, boolean read) {
this(ids, read, false, false);
public NotificationUpdateTask(List<Long> ids, boolean seen) {
this(ids, false, true, false);
}
public NotificationUpdateTask(List<Long> ids, boolean read, boolean seen, boolean updateSeen) {
public NotificationUpdateTask(List<Long> ids, boolean read, boolean seen, boolean updateRead) {
this.ids = ids;
this.read = read;
this.seen = seen;
this.updateSeen = updateSeen;
this.updateRead = updateRead;
}
protected Boolean doInBackground(Void... params) {
Map<String, String> options = new HashMap<>();
options.put("notification_ids", Helper.joinL(ids, ","));
options.put("is_read", String.valueOf(read));
if (updateSeen) {
options.put("is_seen", String.valueOf(seen));
options.put("is_seen", String.valueOf(seen));
if (updateRead) {
options.put("is_read", String.valueOf(read));
}
try {
@@ -18,6 +18,7 @@ import io.lbry.browser.exceptions.ApiCallException;
import io.lbry.browser.exceptions.LbryUriException;
import io.lbry.browser.model.Tag;
import io.lbry.browser.model.lbryinc.Subscription;
import io.lbry.browser.utils.Helper;
import io.lbry.browser.utils.Lbry;
import io.lbry.browser.utils.LbryUri;
@@ -69,6 +70,8 @@ public class LoadSharedUserStateTask extends AsyncTask<Void, Void, Boolean> {
value.has("subscriptions") && !value.isNull("subscriptions") ? value.getJSONArray("subscriptions") : null;
JSONArray tags =
value.has("tags") && !value.isNull("tags") ? value.getJSONArray("tags") : null;
JSONArray following =
value.has("following") && !value.isNull("following") ? value.getJSONArray("following") : null;
if (subscriptionUrls != null) {
subscriptions = new ArrayList<>();
@@ -78,7 +81,8 @@ public class LoadSharedUserStateTask extends AsyncTask<Void, Void, Boolean> {
LbryUri uri = LbryUri.parse(LbryUri.normalize(url));
Subscription subscription = new Subscription();
subscription.setChannelName(uri.getChannelName());
subscription.setUrl(url);
subscription.setUrl(uri.toString());
subscription.setNotificationsDisabled(isNotificationsDisabledForSubUrl(uri.toString(), following));
subscriptions.add(subscription);
if (db != null) {
DatabaseHelper.createOrUpdateSubscription(subscription, db);
@@ -125,6 +129,28 @@ public class LoadSharedUserStateTask extends AsyncTask<Void, Void, Boolean> {
return false;
}
protected boolean isNotificationsDisabledForSubUrl(String url, JSONArray following) {
if (following == null) {
return true;
}
try {
for (int i = 0; i < following.length(); i++) {
JSONObject item = following.getJSONObject(i);
String itemUrl = Helper.getJSONString("url", null, item);
boolean notificationsDisabled = Helper.getJSONBoolean("notificationsDisabled", true, item);
if (url.equalsIgnoreCase(itemUrl)) {
return notificationsDisabled;
}
}
} catch (JSONException ex) {
// pass
}
// always default notifications disabled to true
return true;
}
protected void onPostExecute(Boolean result) {
if (handler != null) {
if (result) {
@@ -2,6 +2,7 @@ package io.lbry.browser.tasks.wallet;
import android.os.AsyncTask;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
@@ -11,9 +12,11 @@ import java.util.List;
import java.util.Map;
import io.lbry.browser.exceptions.ApiCallException;
import io.lbry.browser.exceptions.LbryUriException;
import io.lbry.browser.model.lbryinc.Subscription;
import io.lbry.browser.utils.Helper;
import io.lbry.browser.utils.Lbry;
import io.lbry.browser.utils.LbryUri;
import io.lbry.browser.utils.Lbryio;
/*
@@ -40,9 +43,16 @@ public class SaveSharedUserStateTask extends AsyncTask<Void, Void, Boolean> {
protected Boolean doInBackground(Void... params) {
// data to save
// current subscriptions
List<Subscription> subs = new ArrayList<>(Lbryio.subscriptions);
List<String> subscriptionUrls = new ArrayList<>();
for (Subscription subscription : Lbryio.subscriptions) {
subscriptionUrls.add(subscription.getUrl());
try {
for (Subscription subscription : subs) {
LbryUri uri = LbryUri.parse(LbryUri.normalize(subscription.getUrl()));
subscriptionUrls.add(uri.toString());
}
} catch (LbryUriException ex) {
error = ex;
return false;
}
// followed tags
@@ -62,6 +72,7 @@ public class SaveSharedUserStateTask extends AsyncTask<Void, Void, Boolean> {
JSONObject value = shared.getJSONObject("value");
value.put("subscriptions", Helper.jsonArrayFromList(subscriptionUrls));
value.put("tags", Helper.jsonArrayFromList(followedTags));
value.put("following", buildUpdatedNotificationsDisabledStates(subs));
sharedObject = shared;
}
}
@@ -71,6 +82,7 @@ public class SaveSharedUserStateTask extends AsyncTask<Void, Void, Boolean> {
JSONObject value = new JSONObject();
value.put("subscriptions", Helper.jsonArrayFromList(subscriptionUrls));
value.put("tags", Helper.jsonArrayFromList(followedTags));
value.put("following", buildUpdatedNotificationsDisabledStates(subs));
sharedObject = new JSONObject();
sharedObject.put("type", "object");
@@ -91,6 +103,26 @@ public class SaveSharedUserStateTask extends AsyncTask<Void, Void, Boolean> {
return false;
}
private static JSONArray buildUpdatedNotificationsDisabledStates(List<Subscription> subscriptions) {
JSONArray states = new JSONArray();
for (Subscription subscription : subscriptions) {
if (!Helper.isNullOrEmpty(subscription.getUrl())) {
try {
JSONObject item = new JSONObject();
LbryUri uri = LbryUri.parse(LbryUri.normalize(subscription.getUrl()));
item.put("uri", uri.toString());
item.put("notificationsDisabled", subscription.isNotificationsDisabled());
states.put(item);
} catch (JSONException | LbryUriException ex) {
// pass
}
}
}
return states;
}
protected void onPostExecute(Boolean result) {
if (handler != null) {
if (result) {
@@ -33,6 +33,7 @@ public class WalletSendTask extends AsyncTask<Void, Void, Boolean> {
Map<String, Object> options = new HashMap<>();
options.put("addresses", Arrays.asList(recipientAddress));
options.put("amount", amount);
options.put("blocking", true);
Lbry.genericApiCall(Lbry.METHOD_WALLET_SEND, options);
} catch (ApiCallException ex) {
error = ex;
@@ -83,6 +83,7 @@ public class ChannelFragment extends BaseFragment implements FetchChannelsListen
private View buttonBell;
private SolidIconView iconBell;
private int subCount;
private TextView textFollow;
private OutlineIconView iconFollow;
private SolidIconView iconUnfollow;
private View layoutNothingAtLocation;
@@ -112,6 +113,7 @@ public class ChannelFragment extends BaseFragment implements FetchChannelsListen
buttonShare = root.findViewById(R.id.channel_view_share);
buttonTip = root.findViewById(R.id.channel_view_tip);
buttonFollowUnfollow = root.findViewById(R.id.channel_view_follow_unfollow);
textFollow = root.findViewById(R.id.channel_view_text_follow);
iconFollow = root.findViewById(R.id.channel_view_icon_follow);
iconUnfollow = root.findViewById(R.id.channel_view_icon_unfollow);
buttonBell = root.findViewById(R.id.channel_view_subscribe_notify);
@@ -226,8 +228,11 @@ public class ChannelFragment extends BaseFragment implements FetchChannelsListen
((MainActivity) context).showMessage(subscription.isNotificationsDisabled() ?
R.string.receive_no_notifications : R.string.receive_all_notifications);
}
checkIsFollowing();
if (context != null) {
context.sendBroadcast(new Intent(MainActivity.ACTION_SAVE_SHARED_USER_STATE));
}
}
@Override
@@ -266,11 +271,9 @@ public class ChannelFragment extends BaseFragment implements FetchChannelsListen
checkIsFollowing();
FollowingFragment.resetClaimSearchContent = true;
if (Lbry.SDK_READY) {
Context context = getContext();
if (context instanceof MainActivity) {
((MainActivity) context).saveSharedUserState();
}
Context context = getContext();
if (context != null) {
context.sendBroadcast(new Intent(MainActivity.ACTION_SAVE_SHARED_USER_STATE));
}
}
@@ -319,6 +322,7 @@ public class ChannelFragment extends BaseFragment implements FetchChannelsListen
boolean isFollowing = Lbryio.isFollowing(claim);
boolean notificationsDisabled = Lbryio.isNotificationsDisabled(claim);
Helper.setViewVisibility(iconFollow, !isFollowing ? View.VISIBLE : View.GONE);
Helper.setViewVisibility(textFollow, !isFollowing ? View.VISIBLE : View.GONE);
Helper.setViewVisibility(iconUnfollow, isFollowing ? View.VISIBLE : View.GONE);
Helper.setViewVisibility(buttonBell, isFollowing ? View.VISIBLE : View.GONE);
@@ -92,6 +92,8 @@ import java.util.Map;
import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import io.lbry.browser.MainActivity;
import io.lbry.browser.R;
@@ -143,7 +145,6 @@ import io.lbry.browser.tasks.lbryinc.ClaimRewardTask;
import io.lbry.browser.tasks.lbryinc.FetchStatCountTask;
import io.lbry.browser.tasks.lbryinc.LogFileViewTask;
import io.lbry.browser.ui.BaseFragment;
import io.lbry.browser.ui.controls.OutlineIconView;
import io.lbry.browser.ui.controls.SolidIconView;
import io.lbry.browser.ui.publish.PublishFragment;
import io.lbry.browser.utils.Helper;
@@ -806,6 +807,10 @@ public class FileViewFragment extends BaseFragment implements
R.string.receive_no_notifications : R.string.receive_all_notifications);
}
checkIsFollowing();
if (context != null) {
context.sendBroadcast(new Intent(MainActivity.ACTION_SAVE_SHARED_USER_STATE));
}
}
@Override
@@ -1521,6 +1526,12 @@ public class FileViewFragment extends BaseFragment implements
onMainActionButtonClicked();
}
});
root.findViewById(R.id.file_view_open_external_button).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
openClaimExternally(claim, claim.getMediaType());
}
});
if (metadata instanceof Claim.StreamMetadata) {
Claim.StreamMetadata streamMetadata = (Claim.StreamMetadata) metadata;
@@ -2068,6 +2079,8 @@ public class FileViewFragment extends BaseFragment implements
}
handled = true;
}
} else {
openClaimExternally(claim, mediaType);
}
}
@@ -2106,7 +2119,17 @@ public class FileViewFragment extends BaseFragment implements
@Override
public void onSuccess(String text) {
String html = buildMarkdownHtml(text);
if (webView != null) {
// Due to a change to Chrome, WebView only displays '#' -and everything after it-
// if it is '%23' instead. Problem appears in text like '#2' or #hashtags.
Pattern pattern = Pattern.compile("#(\\S+)");
Matcher matcher = pattern.matcher(html);
if (matcher.find()) {
html = html.replaceAll(pattern.toString(), "&%2335;" + matcher.group(1));
}
webView.loadData(html, "text/html", "utf-8");
}
}
@@ -2144,6 +2167,18 @@ public class FileViewFragment extends BaseFragment implements
" </html>";
}
private void openClaimExternally(Claim claim, String mediaType) {
File file = new File(claim.getFile().getDownloadPath());
Uri fileUri = Uri.parse(claim.getFile().getDownloadPath());
Intent intent = new Intent();
intent.setAction(Intent.ACTION_VIEW);
intent.setDataAndType(fileUri, mediaType.toLowerCase());
intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
Intent chooser = Intent.createChooser(intent, getString(R.string.choose_app));
startActivityForResult(chooser, 419);
}
public void showError(String message) {
View root = getView();
if (root != null) {
@@ -2562,7 +2597,7 @@ public class FileViewFragment extends BaseFragment implements
Context context = getContext();
View root = getView();
if (context != null && root != null) {
OutlineIconView iconFollow = root.findViewById(R.id.file_view_icon_follow);
View iconFollow = root.findViewById(R.id.file_view_icon_follow);
SolidIconView iconUnfollow = root.findViewById(R.id.file_view_icon_unfollow);
SolidIconView iconBell = root.findViewById(R.id.file_view_icon_bell);
Helper.setViewVisibility(iconFollow, !isFollowing ? View.VISIBLE: View.GONE);
@@ -257,7 +257,7 @@ public class PublishFormFragment extends BaseFragment implements
suggestedTagsAdapter.setClickListener(this);
suggestedTagsList.setAdapter(suggestedTagsAdapter);
matureTagsAdapter = new TagListAdapter(Helper.getTagObjectsForTags(Predefined.MATURE_TAGS), context);
matureTagsAdapter = new TagListAdapter(Helper.getTagObjectsForTags(Predefined.PUBLISH_MATURE_TAGS), context);
matureTagsAdapter.setCustomizeMode(TagListAdapter.CUSTOMIZE_MODE_ADD);
matureTagsAdapter.setClickListener(this);
matureTagsList.setAdapter(matureTagsAdapter);
@@ -21,6 +21,8 @@ import com.google.android.material.textfield.TextInputEditText;
import io.lbry.browser.MainActivity;
import io.lbry.browser.R;
import io.lbry.browser.VerificationActivity;
import io.lbry.browser.listener.SdkStatusListener;
import io.lbry.browser.listener.WalletSyncListener;
import io.lbry.browser.model.WalletSync;
import io.lbry.browser.tasks.wallet.DefaultSyncTaskHandler;
@@ -33,7 +35,7 @@ import io.lbry.browser.utils.Lbryio;
import io.lbry.lbrysdk.Utils;
import lombok.Setter;
public class WalletVerificationFragment extends Fragment {
public class WalletVerificationFragment extends Fragment implements SdkStatusListener {
@Setter
private WalletSyncListener listener = null;
@@ -86,6 +88,30 @@ public class WalletVerificationFragment extends Fragment {
@Override
public void onResume() {
super.onResume();
if (!Lbry.SDK_READY) {
Context context = getContext();
if (context instanceof VerificationActivity) {
VerificationActivity activity = (VerificationActivity) context;
activity.addSdkStatusListener(this);
}
Helper.setViewVisibility(loading, View.VISIBLE);
Helper.setViewVisibility(textLoading, View.VISIBLE);
} else {
onSdkReady();
}
}
@Override
public void onStop() {
Context context = getContext();
if (context instanceof VerificationActivity) {
VerificationActivity activity = (VerificationActivity) context;
activity.removeSdkStatusListener(this);
}
super.onStop();
}
public void onSdkReady() {
start();
}
@@ -10,7 +10,7 @@ import lombok.Data;
@Data
public class LbryUri {
public static final String LBRY_TV_BASE_URL = "https://lbry.tv";
public static final String LBRY_TV_BASE_URL = "https://lbry.tv/";
public static final String PROTO_DEFAULT = "lbry://";
public static final String REGEX_INVALID_URI = "[ =&#:$@%?;/\\\\\"<>%\\{\\}|^~\\[\\]`\u0000-\u0008\u000b-\u000c\u000e-\u001F\uD800-\uDFFF\uFFFE-\uFFFF]";
public static final String REGEX_ADDRESS = "^(b)(?=[^0OIl]{32,33})[0-9A-Za-z]{32,33}$";
@@ -183,7 +183,7 @@ public class LbryUri {
return uri;
}
public String build(boolean includeProto, String protoDefault, boolean vanity) {
public String build(boolean includeProto, String protocol, boolean vanity) {
String formattedChannelName = null;
if (channelName != null) {
formattedChannelName = channelName.startsWith("@") ? channelName : String.format("@%s", channelName);
@@ -206,7 +206,7 @@ public class LbryUri {
StringBuilder sb = new StringBuilder();
if (includeProto) {
sb.append(protoDefault);
sb.append(protocol);
}
sb.append(primaryClaimName);
if (vanity) {
@@ -224,79 +224,34 @@ public class LbryUri {
if (!Helper.isNullOrEmpty(primaryClaimId)) {
sb.append('#').append(primaryClaimId);
}
if (primaryClaimSequence > 0) {
} else if (primaryClaimSequence > 0) {
sb.append(':').append(primaryClaimSequence);
}
if (primaryBidPosition > 0) {
} else if (primaryBidPosition > 0) {
sb.append('$').append(primaryBidPosition);
}
if (!Helper.isNullOrEmpty(secondaryClaimName)) {
sb.append('/').append(secondaryClaimName);
}
if (!Helper.isNullOrEmpty(secondaryClaimId)) {
sb.append('#').append(secondaryClaimId);
}
if (secondaryClaimSequence > 0) {
} else if (secondaryClaimSequence > 0) {
sb.append(':').append(secondaryClaimSequence);
}
if (secondaryBidPosition > 0) {
} else if (secondaryBidPosition > 0) {
sb.append('$').append(secondaryBidPosition);
}
return sb.toString();
}
public String toTvString() {
String formattedChannelName = null;
if (channelName != null) {
formattedChannelName = channelName.startsWith("@") ? channelName : String.format("@%s", channelName);
}
String primaryClaimName = claimName;
if (Helper.isNullOrEmpty(primaryClaimName)) {
primaryClaimName = contentName;
}
if (Helper.isNullOrEmpty(primaryClaimName)) {
primaryClaimName = formattedChannelName;
}
if (Helper.isNullOrEmpty(primaryClaimName)) {
primaryClaimName = streamName;
}
String primaryClaimId = claimId;
if (Helper.isNullOrEmpty(primaryClaimId)) {
primaryClaimId = !Helper.isNullOrEmpty(formattedChannelName) ? channelClaimId : streamClaimId;
}
StringBuilder sb = new StringBuilder();
sb.append(LBRY_TV_BASE_URL).append('/');
sb.append(primaryClaimName);
String secondaryClaimName = null;
if (Helper.isNullOrEmpty(claimName) && !Helper.isNullOrEmpty(contentName)) {
secondaryClaimName = contentName;
}
if (Helper.isNullOrEmpty(secondaryClaimName)) {
secondaryClaimName = !Helper.isNullOrEmpty(formattedChannelName) ? streamName : null;
}
String secondaryClaimId = !Helper.isNullOrEmpty(secondaryClaimName) ? streamClaimId : null;
if (!Helper.isNullOrEmpty(primaryClaimId)) {
sb.append(':').append(primaryClaimId);
}
if (!Helper.isNullOrEmpty(secondaryClaimName)) {
sb.append('/').append(secondaryClaimName);
}
if (!Helper.isNullOrEmpty(secondaryClaimId)) {
sb.append(':').append(secondaryClaimId);
}
return sb.toString();
}
public static String normalize(String url) throws LbryUriException {
return parse(url).toString();
}
public String toTvString() {
return build(true, LBRY_TV_BASE_URL, false);
}
public String toVanityString() {
return build(true, PROTO_DEFAULT, true);
}
@@ -515,6 +515,13 @@ public final class Predefined {
"fuck",
"hentai"
);
// Subset of mature tags to be displayed on the publish page
public static final List<String> PUBLISH_MATURE_TAGS = Arrays.asList(
"porn",
"nsfw",
"mature",
"xxx"
);
public static final List<String> ADJECTIVES = Arrays.asList(
"aback",
"abaft",
+6 -163
View File
@@ -156,173 +156,16 @@
android:textColor="@color/white"
android:textFontWeight="300"
android:textSize="14sp" />
<LinearLayout
<ListView
android:id="@+id/startup_stage_error_listview"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:orientation="horizontal">
<ImageView
android:id="@+id/startup_stage_icon_install_id"
android:layout_width="16dp"
android:layout_height="16dp"
android:layout_gravity="center_vertical"
android:tint="@color/white"
android:src="@drawable/ic_check" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_gravity="center_vertical"
android:fontFamily="@font/inter"
android:text="@string/installation_id_loaded"
android:textColor="@color/white"
android:textFontWeight="300"
android:textSize="14sp" />
</LinearLayout>
android:divider="@android:color/transparent"
android:dividerHeight="8dp"
tools:listitem="@layout/list_item_startupstage">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:orientation="horizontal">
<ImageView
android:id="@+id/startup_stage_icon_known_tags"
android:layout_width="16dp"
android:layout_height="16dp"
android:layout_gravity="center_vertical"
android:tint="@color/white"
android:src="@drawable/ic_check" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_gravity="center_vertical"
android:fontFamily="@font/inter"
android:text="@string/known_tags_loaded"
android:textColor="@color/white"
android:textFontWeight="300"
android:textSize="14sp" />
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:orientation="horizontal">
<ImageView
android:id="@+id/startup_stage_icon_exchange_rate"
android:layout_width="16dp"
android:layout_height="16dp"
android:layout_gravity="center_vertical"
android:tint="@color/white"
android:src="@drawable/ic_check" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_gravity="center_vertical"
android:fontFamily="@font/inter"
android:text="@string/exchange_rate_loaded"
android:textColor="@color/white"
android:textFontWeight="300"
android:textSize="14sp" />
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:orientation="horizontal">
<ImageView
android:id="@+id/startup_stage_icon_user_authenticated"
android:layout_width="16dp"
android:layout_height="16dp"
android:layout_gravity="center_vertical"
android:tint="@color/white"
android:src="@drawable/ic_check" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_gravity="center_vertical"
android:fontFamily="@font/inter"
android:text="@string/user_authenticated"
android:textColor="@color/white"
android:textFontWeight="300"
android:textSize="14sp" />
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:orientation="horizontal">
<ImageView
android:id="@+id/startup_stage_icon_install_new"
android:layout_width="16dp"
android:layout_height="16dp"
android:layout_gravity="center_vertical"
android:tint="@color/white"
android:src="@drawable/ic_check" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_gravity="center_vertical"
android:fontFamily="@font/inter"
android:text="@string/installation_registered"
android:textColor="@color/white"
android:textFontWeight="300"
android:textSize="14sp" />
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:orientation="horizontal">
<ImageView
android:id="@+id/startup_stage_icon_subscriptions_loaded"
android:layout_width="16dp"
android:layout_height="16dp"
android:layout_gravity="center_vertical"
android:tint="@color/white"
android:src="@drawable/ic_check" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_gravity="center_vertical"
android:fontFamily="@font/inter"
android:text="@string/subscriptions_loaded"
android:textColor="@color/white"
android:textFontWeight="300"
android:textSize="14sp" />
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:orientation="horizontal">
<ImageView
android:id="@+id/startup_stage_icon_subscriptions_resolved"
android:layout_width="16dp"
android:layout_height="16dp"
android:layout_gravity="center_vertical"
android:tint="@color/white"
android:src="@drawable/ic_check" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_gravity="center_vertical"
android:fontFamily="@font/inter"
android:text="@string/subscriptions_resolved"
android:textColor="@color/white"
android:textFontWeight="300"
android:textSize="14sp" />
</LinearLayout>
</ListView>
</LinearLayout>
</RelativeLayout>
+24 -36
View File
@@ -38,6 +38,12 @@
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_above="@id/wallet_balance_usd_value">
<ImageView
android:layout_width="20dp"
android:layout_height="20dp"
android:layout_gravity="center_vertical"
android:layout_marginEnd="4dp"
android:src="@drawable/ic_credits" />
<TextView
android:id="@+id/wallet_balance_value"
android:layout_width="wrap_content"
@@ -48,15 +54,6 @@
android:textSize="36sp"
android:textFontWeight="300"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="4dp"
android:fontFamily="@font/inter"
android:text="@string/lbc"
android:textColor="@color/white"
android:textSize="16sp"
android:textFontWeight="300" />
</LinearLayout>
<TextView
android:id="@+id/wallet_balance_usd_value"
@@ -145,6 +142,12 @@
android:orientation="horizontal"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<ImageView
android:layout_width="14dp"
android:layout_height="14dp"
android:layout_gravity="center_vertical"
android:src="@drawable/ic_credits"
android:layout_marginEnd="4dp" />
<TextView
android:id="@+id/wallet_balance_tips"
android:layout_width="wrap_content"
@@ -152,15 +155,6 @@
android:fontFamily="@font/inter"
android:text="0"
android:textSize="24sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="2dp"
android:fontFamily="@font/inter"
android:text="@string/lbc"
android:textAllCaps="true"
android:textSize="10sp"
android:textFontWeight="300" />
</LinearLayout>
<TextView
@@ -248,6 +242,12 @@
android:orientation="horizontal"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<ImageView
android:layout_width="14dp"
android:layout_height="14dp"
android:layout_gravity="center_vertical"
android:src="@drawable/ic_credits"
android:layout_marginEnd="4dp" />
<TextView
android:id="@+id/wallet_balance_staked_publishes"
android:layout_width="wrap_content"
@@ -255,15 +255,6 @@
android:fontFamily="@font/inter"
android:text="0"
android:textSize="24sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="2dp"
android:fontFamily="@font/inter"
android:text="@string/lbc"
android:textAllCaps="true"
android:textSize="10sp"
android:textFontWeight="300" />
</LinearLayout>
<TextView
@@ -278,6 +269,12 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="16dp">
<ImageView
android:layout_width="14dp"
android:layout_height="14dp"
android:layout_gravity="center_vertical"
android:src="@drawable/ic_credits"
android:layout_marginEnd="4dp" />
<TextView
android:id="@+id/wallet_balance_staked_supports"
android:layout_width="wrap_content"
@@ -285,15 +282,6 @@
android:fontFamily="@font/inter"
android:text="0"
android:textSize="24sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="2dp"
android:fontFamily="@font/inter"
android:text="@string/lbc"
android:textAllCaps="true"
android:textSize="10sp"
android:textFontWeight="300" />
</LinearLayout>
<TextView
@@ -8,7 +8,7 @@
android:layout_marginBottom="8dp"
android:layout_marginEnd="8dp"
android:elevation="4dp"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintBottom_toBottomOf="parent">
<LinearLayout
android:id="@+id/floating_reward_container"
@@ -50,7 +50,7 @@
android:foreground="?attr/selectableItemBackground"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toRightOf="@id/floating_reward_container"
android:layout_toEndOf="@id/floating_reward_container"
android:layout_marginStart="-36dp"
android:paddingTop="8dp"
android:paddingBottom="8dp"
+16 -2
View File
@@ -208,13 +208,27 @@
android:id="@+id/channel_view_follow_unfollow"
android:background="?attr/selectableItemBackground"
android:clickable="true"
android:layout_width="36dp"
android:layout_width="wrap_content"
android:layout_height="36dp">
<TextView
android:id="@+id/channel_view_text_follow"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginStart="6dp"
android:layout_marginEnd="6dp"
android:fontFamily="@font/inter"
android:text="@string/follow"
android:textSize="12sp"
android:textStyle="bold"
android:textAllCaps="true" />
<io.lbry.browser.ui.controls.OutlineIconView
android:id="@+id/channel_view_icon_follow"
android:layout_centerInParent="true"
android:layout_toRightOf="@id/channel_view_text_follow"
android:layout_centerVertical="true"
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_marginEnd="6dp"
android:text="@string/fa_heart"
android:textColor="@color/red"
android:textSize="20dp" />
+34 -9
View File
@@ -157,6 +157,13 @@
android:textFontWeight="300"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<com.google.android.material.button.MaterialButton
android:id="@+id/file_view_open_external_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:fontFamily="@font/inter"
android:textSize="14sp"
android:text="@string/open" />
</LinearLayout>
</RelativeLayout>
</RelativeLayout>
@@ -576,17 +583,35 @@
android:orientation="horizontal"
android:layout_centerVertical="true"
android:layout_alignParentEnd="true">
<io.lbry.browser.ui.controls.OutlineIconView
<LinearLayout
android:id="@+id/file_view_icon_follow"
android:clickable="true"
android:background="?attr/selectableItemBackground"
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
android:text="@string/fa_heart"
android:textColor="@color/red"
android:textSize="20dp" />
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingTop="8dp"
android:paddingBottom="8dp"
android:orientation="horizontal"
android:clickable="true">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginStart="16dp"
android:fontFamily="@font/inter"
android:text="@string/follow"
android:textSize="12sp"
android:textStyle="bold"
android:textAllCaps="true" />
<io.lbry.browser.ui.controls.OutlineIconView
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
android:text="@string/fa_heart"
android:textColor="@color/red"
android:textSize="20dp" />
</LinearLayout>
<io.lbry.browser.ui.controls.SolidIconView
android:id="@+id/file_view_icon_unfollow"
@@ -48,7 +48,7 @@
android:layout_height="wrap_content"
android:layout_marginStart="4dp"
android:fontFamily="@font/inter"
android:text="@string/uploading"
android:text="@string/uploading_thumbnail"
android:textColor="@color/white"
android:textFontWeight="300"
android:textSize="12sp" />
@@ -316,7 +316,7 @@
<androidx.appcompat.widget.AppCompatSpinner
android:id="@+id/publish_form_currency_spinner"
android:entries="@array/publish_currencies"
android:layout_width="110dp"
android:layout_width="160dp"
android:layout_height="wrap_content"
android:layout_toEndOf="@+id/publish_form_price_layout"
android:layout_marginStart="4dp"
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:tools="http://schemas.android.com/tools">
<ImageView
android:id="@+id/startup_stage_icon"
android:layout_width="16dp"
android:layout_height="16dp"
android:layout_gravity="center_vertical"
android:tint="@color/white"
android:src="@drawable/ic_check" />
<TextView
android:id="@+id/startup_stage_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_gravity="center_vertical"
android:fontFamily="@font/inter"
tools:text="@string/installation_id_loaded"
android:textColor="@color/white"
android:textFontWeight="300"
android:textSize="14sp" />
</LinearLayout>
@@ -26,7 +26,7 @@
/>
<TextView
android:id="@+id/transaction_amount"
android:gravity="right"
android:gravity="end"
android:layout_weight="4"
android:layout_width="0dp"
android:layout_height="wrap_content"
@@ -34,7 +34,9 @@
android:fontFamily="@font/inter"
android:singleLine="true"
android:textSize="14sp"
android:textFontWeight="300" />
android:textFontWeight="300"
android:textAlignment="viewEnd"
android:textDirection="ltr"/>
</LinearLayout>
<LinearLayout
@@ -60,7 +62,7 @@
/>
<TextView
android:id="@+id/transaction_fee"
android:gravity="right"
android:gravity="end"
android:layout_weight="4"
android:layout_width="0dp"
android:layout_height="wrap_content"
@@ -90,10 +92,11 @@
android:textColor="@color/lbryGreen"
android:textSize="12sp"
android:textFontWeight="300"
android:textAlignment="viewStart"
/>
<TextView
android:id="@+id/transaction_date"
android:gravity="right"
android:gravity="end"
android:layout_weight="4"
android:layout_width="0dp"
android:layout_height="wrap_content"
@@ -106,7 +109,7 @@
android:visibility="gone" />
<TextView
android:id="@+id/transaction_pending_text"
android:gravity="right"
android:gravity="end"
android:layout_weight="4"
android:layout_width="0dp"
android:layout_height="wrap_content"
+15 -12
View File
@@ -28,7 +28,7 @@
<string name="welcome_to_lbry">Welcome to LBRY.</string>
<string name="welcome_paragraph">LBRY is a community-controlled content platform where you can find and publish videos, music, books, and more.</string>
<string name="welcome_tos">By continuing, I agree to the &lt;a href="https://lbry.com/termsofservice"&gt;Terms of Service&lt;/a&gt; and confirm I am over the age of 13.</string>
<string name="welcome_please_wait">Please wait while we get some things ready...</string>
<string name="welcome_please_wait">Please wait while we get some things ready…</string>
<string name="use_lbry">Use LBRY »</string>
<!-- URI bar -->
@@ -40,7 +40,7 @@
<string name="discover">Discover</string>
<string name="lbry_works_better">LBRY works better if you follow at least 5 creators you like. Sign in to show creators you follow if you already have an account.</string>
<string name="select_five_subscriptions">Please select up to 5 creators to continue.</string>
<string name="n_remaining">%1$d remaining...</string>
<string name="n_remaining">%1$d remaining…</string>
<string name="done">Done</string>
<string name="all">All</string>
<string name="discover_channels">Discover new channels</string>
@@ -58,7 +58,7 @@
<string name="download">Download</string>
<string name="open">Open</string>
<string name="report">Report</string>
<string name="loading_decentralized_data">Loading decentralized data...</string>
<string name="loading_decentralized_data">Loading decentralized data…</string>
<string name="related_content">Related Content</string>
<string name="comments">Comments</string>
<string name="no_comments">No comments to display at this time.</string>
@@ -91,6 +91,7 @@
<string name="please_select_repost_channel">Please select a channel to repost on.</string>
<string name="reply">Reply</string>
<string name="replying_to">Replying to %1$s</string>
<string name="choose_app">Choose app</string>
<plurals name="post_and_tip">
<item quantity="one">Post and tip %1$s credit?</item>
<item quantity="other">Post and tip %1$s credits?</item>
@@ -130,7 +131,7 @@
<string name="take_photo">Take a Photo</string>
<string name="upload_file">Upload a file</string>
<string name="no_videos_found">We could not find any videos on your device. Take a photo or record a video to get started.</string>
<string name="loading_videos">Please wait while we load your videos...</string>
<string name="loading_videos">Please wait while we load your videos…</string>
<string name="storage_permission_rationale_videos">LBRY requires access to be able to display and publish your videos, images and other files from your device.</string>
<string name="camera_permission_rationale_record">LBRY requires access to your camera to record videos.</string>
<string name="camera_permission_rationale_photo">LBRY requires access to your camera to take photos.</string>
@@ -275,7 +276,7 @@
<string name="in_your_publishes">in your publishes</string>
<string name="in_your_supports">in your supports</string>
<string name="earn_more_tips">Earn more tips by uploading cool videos</string>
<string name="sdk_initializing">The background service is initializing...</string>
<string name="sdk_initializing">The background service is initializing…</string>
<string name="sdk_still_initializing">The background service is still initializing. You can explore and watch content in the mean time.</string>
<string name="sdk_initializing_functionality">You cannot do this right now because the background service is still initializing.</string>
@@ -316,7 +317,7 @@
<string name="manual_backup">&lt;a href="https://lbry.com/faq/how-to-backup-wallet#android"&gt;Manual backup&lt;/a&gt;</string>
<string name="sync_faq">&lt;a href="https://lbry.com/faq/how-to-backup-wallet#sync"&gt;Sync FAQ&lt;/a&gt;</string>
<string name="zero">0</string>
<string name="lbc" translatable="false">Credits</string>
<string name="lbc">Credits</string>
<string name="account_recommended">Account Recommended</string>
<string name="wallet_account_desc">A lbry.tv account allows you to earn rewards, backup your wallet, and keep everything in sync.</string>
@@ -329,7 +330,7 @@
<string name="insufficient_balance">Insufficient balance</string>
<string name="invalid_amount">Please enter a valid amount</string>
<string name="send_credit_error">Your credits could not be sent at this time. Please try again later.</string>
<string name="loading_transactions">Loading transactions...</string>
<string name="loading_transactions">Loading transactions…</string>
<string name="no_recent_transactions">There are no recent transactions to display.</string>
<string name="no_transactions">There are no transactions to display at this time.</string>
<string name="tx_list_fee">fee %1$s</string>
@@ -420,8 +421,8 @@
<string name="provide_valid_email">Please enter a valid email address</string>
<string name="please_follow_instructions">Please follow the instructions in the email sent to your address to continue.</string>
<string name="sign_in_successful">You have successfully signed in to lbry.tv</string>
<string name="retrieving_account_information">Retrieving account information...</string>
<string name="apply_wallet_data">Applying wallet data...</string>
<string name="retrieving_account_information">Retrieving account information…</string>
<string name="apply_wallet_data">Applying wallet data…</string>
<string name="please_enter_your_password">Please enter the password you used to secure your wallet.</string>
<string name="please_enter_a_password">Please enter a password to secure your wallet.</string>
<string name="wallet_security_purposes">Note: for wallet security purposes, LBRY is unable to reset your password.</string>
@@ -466,7 +467,7 @@
<!-- Channels -->
<string name="no_channel_created">You have not created a channel.\nStart now by creating a new channel!</string>
<string name="create_a_channel">Create a channel</string>
<string name="create_a_channel_item">Create a channel...</string>
<string name="create_a_channel_item">Create a channel…</string>
<string name="edit_channel">Edit channel</string>
<string name="delete_selection">Delete selection?</string>
<string name="delete_channel">Delete channel?</string>
@@ -474,6 +475,7 @@
<string name="channel_deleted">The channel was successfully deleted.</string>
<string name="channel_failed_delete">The channel could not be deleted at this time. Please try again later.</string>
<string name="description">Description</string>
<string name="follow">Follow</string>
<string name="yes">Yes</string>
<string name="no">No</string>
<string name="show_optional_fields">Show optional fields</string>
@@ -491,7 +493,8 @@
<string name="undetermined_image_filepath">The file path could not be determined for the selected image. Please select an image in a different location.</string>
<string name="wait_for_upload">Please wait for the current upload to finish.</string>
<string name="image_upload_failed">The image upload request failed. Please try again.</string>
<string name="uploading">Uploading...</string>
<string name="uploading">Uploading…</string>
<string name="uploading_thumbnail">Uploading thumbnail…</string>
<string name="please_enter_channel_name">Please enter a channel name.</string>
<string name="channel_name_invalid_characters">Your channel name contains invalid characters.</string>
<string name="channel_name_already_created">You have already created a channel with the same name.</string>
@@ -606,7 +609,7 @@
<string name="get_social">Get Social</string>
<string name="social_paragraph">You can interact with the LBRY team and members of the community on Discord, Facebook, Instagram, Twitter or Reddit.</string>
<string name="app_info">App info</string>
<string name="loading">Loading...</string>
<string name="loading">Loading…</string>
<string name="about_link_what_is_lbry">&lt;a href="https://lbry.com/faq/what-is-lbry"&gt;What is LBRY?&lt;/a&gt;</string>
<string name="about_link_android_basics">&lt;a href="https://lbry.com/faq/android-basics"&gt;Android Basics&lt;/a&gt;</string>
<string name="about_link_faq">&lt;a href="https://lbry.com/faq"&gt;FAQ&lt;/a&gt;</string>