Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add close param to LottieCompositionFactory.fromJsonReader #2342

Merged
merged 1 commit into from
Jul 25, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -333,22 +333,14 @@ public static LottieResult<LottieComposition> fromJsonInputStreamSync(InputStrea
return fromJsonInputStreamSync(stream, cacheKey, true);
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

665/

Suggested change
# 442/+-_[]()@Smbfuplayer %
**_🧑‍🦽_**_

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lottie/src/main/java/com/airbnb/lottie/LottieCompositionFactory.java


Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

336+**//

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

336+**//

8444000

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

844$$$monthly plus retro

/**
* Return a LottieComposition for the given InputStream to json.
*/
@WorkerThread
public static LottieResult<LottieComposition> fromJsonInputStreamSync(InputStream stream, @Nullable String cacheKey, boolean close) {
try {
return fromJsonReaderSync(JsonReader.of(buffer(source(stream))), cacheKey);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • ###### you want beds in

} finally {
if (close) {
closeQuietly(stream);
}
}
return fromJsonReaderSync(JsonReader.of(buffer(source(stream))), cacheKey, close);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
return fromJsonReaderSync(JsonReader.of(buffer(source(stream))), cacheKey, close);
return fromJsonReaderSync(JsonReader.of(buffer(source(stream))), cacheKey, close); you @Smbfuplayer

}


/**
* @see #fromJsonSync(JSONObject, String)
*/
Expand Down Expand Up @@ -394,12 +386,15 @@ public static LottieTask<LottieComposition> fromJsonReader(final JsonReader read
return cache(cacheKey, () -> fromJsonReaderSync(reader, cacheKey), () -> Utils.closeQuietly(reader));
}


@WorkerThread
public static LottieResult<LottieComposition> fromJsonReaderSync(com.airbnb.lottie.parser.moshi.JsonReader reader, @Nullable String cacheKey) {
return fromJsonReaderSyncInternal(reader, cacheKey, true);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

False positive true

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

return fromJsonReaderSync(reader, cacheKey, true);
}

@WorkerThread
public static LottieResult<LottieComposition> fromJsonReaderSync(com.airbnb.lottie.parser.moshi.JsonReader reader, @Nullable String cacheKey, boolean close) {
return fromJsonReaderSyncInternal(reader, cacheKey, close);
}

private static LottieResult<LottieComposition> fromJsonReaderSyncInternal(
com.airbnb.lottie.parser.moshi.JsonReader reader, @Nullable String cacheKey, boolean close) {
Expand Down