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

(closes PR# 248)Singleton local storage #297

Merged
merged 8 commits into from
Jun 28, 2020

Conversation

ShresthPratapSingh
Copy link
Contributor

A shared instance of LocalStorage class is used in the app in order to provide Global point access to its object. Since the init was still public anyone could create a new object of LocalStorage, killing the whole point of using a shared instance and this provides room for errors.
Making the init private ensures that creating new objects of this class is prohibited and you are compelled to use the shared instance.

This PR will close PR # 248(Changed LocalStorage(a singleton class) init to private)

magauran and others added 7 commits April 8, 2019 00:53
- Simplify the declaration of a read-only computed property by removing get keyword
- Fix incorrect import (Foundation is not enough to work with UIColor)
- Fix an incorrect data type of the parameters (the previous implementation will not work correctly if UIColor's initializer with Int type parameters appears)
- Correct the indents between operands
Add notes to ensure contributors do not push sensitive contents.
@ShresthPratapSingh ShresthPratapSingh changed the title Singleton local storage closes PR # 248 (closes PR# 248)Singleton local storage Jun 27, 2020
@ShresthPratapSingh
Copy link
Contributor Author

@cpg please have a look.

AmahiAnywhere/Podfile.lock Outdated Show resolved Hide resolved
@cpg cpg assigned cpg and unassigned ShresthPratapSingh Jun 28, 2020
@cpg cpg merged commit ead4c22 into amahi:beta Jun 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants