Skip to content

Commit d9ea203

Browse files
committed
add public getTags method
1 parent 473ca90 commit d9ea203

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

OneSignalSDK/onesignal/core/src/main/java/com/onesignal/user/IUserManager.kt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,4 +133,9 @@ interface IUserManager {
133133
* @param keys The collection of keys, all of which will be removed from the current user.
134134
*/
135135
fun removeTags(keys: Collection<String>)
136+
137+
/**
138+
* Return a copy of all local tags from the current user.
139+
*/
140+
fun getTags() : Map<String, String>
136141
}

OneSignalSDK/onesignal/core/src/main/java/com/onesignal/user/internal/UserManager.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,4 +218,8 @@ internal open class UserManager(
218218
_propertiesModel.tags.remove(it)
219219
}
220220
}
221+
222+
override fun getTags(): Map<String, String> {
223+
return _propertiesModel.tags.toMap()
224+
}
221225
}

0 commit comments

Comments
 (0)