Skip to content

Instantly share code, notes, and snippets.

@rohitsat13
Last active March 22, 2021 21:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rohitsat13/edc2bcaec09d55e37c45a2be4d3afaf6 to your computer and use it in GitHub Desktop.
Save rohitsat13/edc2bcaec09d55e37c45a2be4d3afaf6 to your computer and use it in GitHub Desktop.
/* Copyright 2021 Google LLC.
SPDX-License-Identifier: Apache-2.0 */
suspend fun setShowCompleted(newShowCompleted: Boolean) {
// This will leave the sortOrder value untouched:
context.dataStore.updateData { it.copy(newShowCompleted = showCompleted) }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment