{"size": 567, "ext": "js", "max_stars_repo_path": "Showcase_Apps/PersistentFilters/PersistentFilters/Rules/Products/LoadFilter.js", "max_stars_repo_name": "MiqueiasMaia/sap-mdk-show-cases", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "Showcase_Apps/PersistentFilters/PersistentFilters/Rules/Products/LoadFilter.js", "max_issues_repo_name": "MiqueiasMaia/sap-mdk-show-cases", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "Showcase_Apps/PersistentFilters/PersistentFilters/Rules/Products/LoadFilter.js", "max_forks_repo_name": "MiqueiasMaia/sap-mdk-show-cases", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 31.5, "max_line_length": 89, "alphanum_fraction": 0.6878306878}
/**
 * Describe this function...
 * @param {IClientAPI} context
 */
export default function LoadFilter(context) {
    let appSettings = context.nativescript.appSettingsModule;
    if (appSettings.hasKey('ProductFilter')) {
        // Saved Product Filter exists so set it as the default for the list
        let filterString = appSettings.getString('ProductFilter');
        let currentFilter = context.convertJSONStringToFilterCriteriaArray(filterString);

        return currentFilter;
    } else {
        // No saved filter so just return
        return;
    }
}
