Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
gthea committed Sep 7, 2023
1 parent beb3d47 commit a0b9a08
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ SplitApiFacade buildApiFacade(SplitClientConfig splitClientConfig,
WorkManagerWrapper buildWorkManagerWrapper(Context context, SplitClientConfig splitClientConfig,
String apiKey, String databaseName, List<SplitFilter> filters) {
return new WorkManagerWrapper(
WorkManager.getInstance(context), splitClientConfig, apiKey, databaseName, (filters != null && filters.size() == 1) ? filters.get(0) : null);
WorkManager.getInstance(context), splitClientConfig, apiKey, databaseName, filters);

}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,20 +46,21 @@ public class WorkManagerWrapper implements MySegmentsWorkManagerWrapper {
// This variable is used to avoid loading data first time
// we receive enqueued event
private final Set<String> mShouldLoadFromLocal;
@Nullable
private final SplitFilter mFilter;

public WorkManagerWrapper(@NonNull WorkManager workManager,
@NonNull SplitClientConfig splitClientConfig,
@NonNull String apiKey,
@NonNull String databaseName,
@Nullable SplitFilter filter) {
@Nullable List<SplitFilter> filters) {
mWorkManager = checkNotNull(workManager);
mDatabaseName = checkNotNull(databaseName);
mSplitClientConfig = checkNotNull(splitClientConfig);
mApiKey = checkNotNull(apiKey);
mShouldLoadFromLocal = new HashSet<>();
mConstraints = buildConstraints();
mFilter = filter;
mFilter = (filters != null && filters.size() == 1) ? filters.get(0) : null;
}

public void setFetcherExecutionListener(SplitTaskExecutionListener fetcherExecutionListener) {
Expand Down

0 comments on commit a0b9a08

Please sign in to comment.