diff --git a/app/src/main/java/io/lbry/browser/MainActivity.java b/app/src/main/java/io/lbry/browser/MainActivity.java index d8ead83e..436f4c28 100644 --- a/app/src/main/java/io/lbry/browser/MainActivity.java +++ b/app/src/main/java/io/lbry/browser/MainActivity.java @@ -349,13 +349,15 @@ public class MainActivity extends AppCompatActivity implements SdkStatusListener }); super.onCreate(savedInstanceState); - castContext = CastContext.getSharedInstance(this); dbHelper = new DatabaseHelper(this); checkNotificationOpenIntent(getIntent()); setContentView(R.layout.activity_main); Toolbar toolbar = findViewById(R.id.toolbar); setSupportActionBar(toolbar); + // TODO: Check Google Play Services availability + // castContext = CastContext.getSharedInstance(this); + ViewCompat.setOnApplyWindowInsetsListener(findViewById(R.id.content_main), new OnApplyWindowInsetsListener() { @Override public WindowInsetsCompat onApplyWindowInsets(View v, WindowInsetsCompat insets) { diff --git a/app/src/main/java/io/lbry/browser/ui/channel/ChannelFormFragment.java b/app/src/main/java/io/lbry/browser/ui/channel/ChannelFormFragment.java index 3f942672..4f3d2b7a 100644 --- a/app/src/main/java/io/lbry/browser/ui/channel/ChannelFormFragment.java +++ b/app/src/main/java/io/lbry/browser/ui/channel/ChannelFormFragment.java @@ -289,11 +289,12 @@ public class ChannelFormFragment extends BaseFragment implements } private void validateAndSaveClaim(Claim claim) { - String channelName = claim.getName().startsWith("@") ? claim.getName().substring(1) : claim.getName(); - if (Helper.isNullOrEmpty(channelName)) { + if (Helper.isNullOrEmpty(claim.getName())) { showError(getString(R.string.please_enter_channel_name)); return; } + + String channelName = claim.getName().startsWith("@") ? claim.getName().substring(1) : claim.getName(); if (!LbryUri.isNameValid(channelName)) { showError(getString(R.string.channel_name_invalid_characters)); return;