sdk 0.37.2 update for release #547
Labels
No labels
android: closed alpha
android: open beta
app-parity
area: devops
area: discovery
area: docs
area: livestream
area: proposal
consider soon
creator
Epic
good first issue
hacktoberfest
help wanted
icebox
Invalid
level: 1
level: 2
level: 3
level: 4
needs: exploration
needs: grooming
needs: priority
needs: repro
needs: tech design
on hold
priority: blocker
priority: high
priority: low
priority: medium
product review
resilience
Tom's Wishlist
type: bug
type: discussion
type: improvement
type: new feature
type: refactor
type: task
type: testing
unplanned
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: LBRYCommunity/lbry-android#547
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "sdk-0.37-rc"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Looks good but could use a few small changes. Also some questions to continue to help me get up to speed on mobile.
hooray!
intended? add to linter to check for these if not
@ -88,3 +95,4 @@
this.setState({ currentTime: position }, () => this.setSeekerPosition(this.calculateSeekerPosition()));
}
if (this.props.onMediaLoaded) {
why 10? what is 10?
const positionSaveInterval = 10
is a better practiceI have
very littleliterally no idea if these values are correct. Are these defaults? How important is it to tune these or get them correct?this looks like it should be something like below (unless you intended 2
setState
calls to be called in succession sometimes, but even in that case you can abstract the shared part of the if statement):@ -371,3 +487,4 @@
costInfo,
fileInfo,
metadata,
contentType,
Would it make sense to instead add an
encoded_file_path
property tofileInfo
in redux? This kind of code seems somewhat out of place in a view component.coughs
Maybe we should show the download button always? Or if the video is playing? In this design, is it now impossible to not stream a video? What if I want to save for offline viewing?
When/why do we use Async storage vs. Redux?
@ -16,6 +16,8 @@ import Colors from 'styles/colors';
import Constants from 'constants';
import firstRunStyle from 'styles/firstRun';
const firstRunMargins = 80;
LINTER
@ -62,3 +58,3 @@
render() {
const { onPasswordChanged, onWalletViewLayout, isRetrievingSync, hasSyncedWallet } = this.props;
const { onPasswordChanged, onWalletViewLayout, getSyncIsPending, hasSyncedWallet, syncApplyIsPending } = this.props;
That 80 seems potentially evil
@ -237,3 +285,4 @@
syncApplyIsPending,
resendVerificationEmail,
user
} = this.props;
Inconsistent casing. I think we generally do not capitalize the second word on actions like this, but what's important is just being consistent.
@ -30,3 +30,3 @@
daemonReady: false,
details: 'Starting daemon',
details: 'Starting up...',
message: 'Connecting',
Good removal of jargon
@ -0,0 +166,4 @@
NotificationManagerCompat notificationManager = NotificationManagerCompat.from(context);
NotificationCompat.Builder builder = null;
int notificationId = getNotificationId(id);
if (builders.containsKey(notificationId)) {
I'm curious if this change was stylistic or necessary 😀 (I agree the new one is better)
Should these log statements be in the release?
@ -121,1 +461,4 @@
return intent;
}
@Override
Looks like you could use the reverse of https://github.com/havardh/javaflow
I continue to think it would be really cool if there was a way for a single definition of
Claim
,File
, etc. to be propagated from the SDK to a variety of languages. We ourselves would presumably use it in JavaScript, Java, Go. (@lyoshenka @eukreign no need to comment, but pointing out a use-case)@ -88,3 +95,4 @@
this.setState({ currentTime: position }, () => this.setSeekerPosition(this.calculateSeekerPosition()));
}
if (this.props.onMediaLoaded) {
Every 10 seconds. Saving every second was resulting in some lag / performance issues.
This was meant for debugging. Will be removed.
Was also using these for testing / debugging. Essentially, these values define how the media player caches bits of loaded media. I'll have to spend some time reading and tuning in order to determine sane values.
@ -0,0 +166,4 @@
NotificationManagerCompat notificationManager = NotificationManagerCompat.from(context);
NotificationCompat.Builder builder = null;
int notificationId = getNotificationId(id);
if (builders.containsKey(notificationId)) {
I remember seeing a few cases where the value of
writtenBytes
was greater thantotalBytes
, so this ended up being necessary.No. These will be removed.
@ -371,3 +487,4 @@
costInfo,
fileInfo,
metadata,
contentType,
Apparently, github hid some of the messages by default, so I missed them. The
fileInfo
is returned by the sdk, but I suppose I can create amakeSelect
selector in order to achieve this.Removed.
The initial download / view button will show up if:
fileInfo
is present and it's a playable media file (audio / video)canOpen
(image, text/plain, text/html, text/*)Once the user has pressed it, we begin the download or stream and then the file page has to display one of:
isPlayable
andcanLoadMedia
aretrue
, orthis.state.streamingMode
istrue
if not downloading.completed
andcanOpen
aretrue
Async storage is used for tracking simple values which don't need to be used more than two or three times when transitioning between screens. Using the redux state would require having to create an action, reducer and selector, which would be unnecessary for the scale of the operation being performed.
@ -16,6 +16,8 @@ import Colors from 'styles/colors';
import Constants from 'constants';
import firstRunStyle from 'styles/firstRun';
const firstRunMargins = 80;
Sometimes, it's okay to forget.
@ -62,3 +58,3 @@
render() {
const { onPasswordChanged, onWalletViewLayout, isRetrievingSync, hasSyncedWallet } = this.props;
const { onPasswordChanged, onWalletViewLayout, getSyncIsPending, hasSyncedWallet, syncApplyIsPending } = this.props;
Should definitely be a constant. It's the left and right first run margins (32 + 32), and the control padding (8 + 8), added together.