Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
M
Magisk
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
Magisk
Commits
8024089b
Commit
8024089b
authored
Oct 06, 2019
by
Viktor De Pasquale
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added indication of whether the manager is hidden
parent
5e01f785
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
0 deletions
+19
-0
XString.kt
app/src/main/java/com/topjohnwu/magisk/extensions/XString.kt
+8
-0
HomeViewModel.kt
.../java/com/topjohnwu/magisk/redesign/home/HomeViewModel.kt
+11
-0
No files found.
app/src/main/java/com/topjohnwu/magisk/extensions/XString.kt
View file @
8024089b
...
...
@@ -4,6 +4,14 @@ import android.content.res.Resources
val
specialChars
=
arrayOf
(
'!'
,
'@'
,
'#'
,
'$'
,
'%'
,
'&'
,
'?'
)
fun
String
.
replaceRandomWithSpecial
(
passes
:
Int
):
String
{
var
string
=
this
repeat
(
passes
)
{
string
=
string
.
replaceRandomWithSpecial
()
}
return
string
}
fun
String
.
replaceRandomWithSpecial
():
String
{
var
random
:
Char
do
{
...
...
app/src/main/java/com/topjohnwu/magisk/redesign/home/HomeViewModel.kt
View file @
8024089b
...
...
@@ -7,6 +7,8 @@ import com.topjohnwu.magisk.BuildConfig
import
com.topjohnwu.magisk.Info
import
com.topjohnwu.magisk.R
import
com.topjohnwu.magisk.data.repository.MagiskRepository
import
com.topjohnwu.magisk.extensions.packageName
import
com.topjohnwu.magisk.extensions.replaceRandomWithSpecial
import
com.topjohnwu.magisk.extensions.res
import
com.topjohnwu.magisk.model.entity.MagiskJson
import
com.topjohnwu.magisk.model.entity.ManagerJson
...
...
@@ -43,6 +45,15 @@ class HomeViewModel(
}
}
val
stateHideManagerName
=
R
.
string
.
manager
.
res
().
let
{
val
result
=
R
.
string
.
manager
.
res
()
if
(
packageName
!=
BuildConfig
.
APPLICATION_ID
)
{
result
.
replaceRandomWithSpecial
(
3
)
}
else
{
result
}
}
val
itemsMainline
=
listOf
(
HomeItem
.
PayPal
.
Mainline
,
HomeItem
.
Patreon
,
HomeItem
.
Twitter
.
Mainline
)
val
itemsApp
=
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment