This commit is contained in:
Javi Rueda 2020-10-16 19:43:22 +02:00
commit bda29ab32a
13 changed files with 122 additions and 71 deletions

View file

@ -14,8 +14,8 @@ android {
applicationId "io.lbry.browser"
minSdkVersion 21
targetSdkVersion 29
versionCode 1607
versionName "0.16.7"
versionCode 1609
versionName "0.16.9"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

View file

@ -57,10 +57,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>

View file

@ -81,6 +81,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;
@ -980,7 +981,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();
@ -993,6 +996,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();

View file

@ -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);

View file

@ -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);
@ -319,6 +321,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);

View file

@ -143,7 +143,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;
@ -2562,7 +2561,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);

View file

@ -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);

View file

@ -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",

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

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" />

View file

@ -576,17 +576,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"

View file

@ -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"

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>
@ -130,7 +130,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 +275,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 +316,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 +329,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 +420,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>
@ -454,7 +454,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>
@ -462,6 +462,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>
@ -479,7 +480,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>
@ -594,7 +596,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>