Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
QuasselDroid-ng
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Janne Mareike Koschinski
QuasselDroid-ng
Commits
d8e56a44
There was a problem fetching the pipeline summary.
Verified
Commit
d8e56a44
authored
May 2, 2018
by
Janne Mareike Koschinski
Browse files
Options
Downloads
Patches
Plain Diff
Fixes #296
Signed-off-by:
Janne Koschinski
<
janne@kuschku.de
>
parent
a85ab9e0
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Pipeline
#
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/src/main/java/de/kuschku/libquassel/quassel/syncables/IgnoreListManager.kt
+17
-7
17 additions, 7 deletions
...kuschku/libquassel/quassel/syncables/IgnoreListManager.kt
with
17 additions
and
7 deletions
lib/src/main/java/de/kuschku/libquassel/quassel/syncables/IgnoreListManager.kt
+
17
−
7
View file @
d8e56a44
...
@@ -169,7 +169,7 @@ class IgnoreListManager constructor(
...
@@ -169,7 +169,7 @@ class IgnoreListManager constructor(
val
scope
:
ScopeType
,
val
scope
:
ScopeType
,
val
scopeRule
:
String
,
val
scopeRule
:
String
,
val
isActive
:
Boolean
,
val
isActive
:
Boolean
,
val
regEx
:
Regex
,
val
regEx
:
Regex
?
,
val
scopeRegEx
:
Set
<
Regex
>
val
scopeRegEx
:
Set
<
Regex
>
)
:
Serializable
{
)
:
Serializable
{
constructor
(
type
:
Int
,
ignoreRule
:
String
,
isRegEx
:
Boolean
,
strictness
:
Int
,
scope
:
Int
,
constructor
(
type
:
Int
,
ignoreRule
:
String
,
isRegEx
:
Boolean
,
strictness
:
Int
,
scope
:
Int
,
...
@@ -181,13 +181,23 @@ class IgnoreListManager constructor(
...
@@ -181,13 +181,23 @@ class IgnoreListManager constructor(
constructor
(
type
:
IgnoreType
,
ignoreRule
:
String
,
isRegEx
:
Boolean
,
strictness
:
StrictnessType
,
constructor
(
type
:
IgnoreType
,
ignoreRule
:
String
,
isRegEx
:
Boolean
,
strictness
:
StrictnessType
,
scope
:
ScopeType
,
scopeRule
:
String
,
isActive
:
Boolean
)
:
this
(
scope
:
ScopeType
,
scopeRule
:
String
,
isActive
:
Boolean
)
:
this
(
type
,
ignoreRule
,
isRegEx
,
strictness
,
scope
,
scopeRule
,
isActive
,
type
,
ignoreRule
,
isRegEx
,
strictness
,
scope
,
scopeRule
,
isActive
,
try
{
Regex
(
ignoreRule
.
let
{
Regex
(
ignoreRule
.
let
{
if
(
isRegEx
)
it
else
GlobTransformer
.
convertGlobToRegex
(
it
)
if
(
isRegEx
)
it
else
GlobTransformer
.
convertGlobToRegex
(
it
)
},
RegexOption
.
IGNORE_CASE
),
},
RegexOption
.
IGNORE_CASE
)
}
catch
(
_
:
Throwable
)
{
null
},
scopeRule
.
split
(
';'
)
scopeRule
.
split
(
';'
)
.
map
(
String
::
trim
)
.
map
(
String
::
trim
)
.
map
(
GlobTransformer
::
convertGlobToRegex
)
.
map
(
GlobTransformer
::
convertGlobToRegex
)
.
map
{
Regex
(
it
,
RegexOption
.
IGNORE_CASE
)
}
.
mapNotNull
{
try
{
Regex
(
it
,
RegexOption
.
IGNORE_CASE
)
}
catch
(
e
:
Throwable
)
{
null
}
}
.
toSet
()
.
toSet
()
)
)
...
@@ -263,8 +273,8 @@ class IgnoreListManager constructor(
...
@@ -263,8 +273,8 @@ class IgnoreListManager constructor(
it
.
scope
==
ScopeType
.
ChannelScope
&&
it
.
scopeRegEx
.
any
{
it
matches
bufferName
}
it
.
scope
==
ScopeType
.
ChannelScope
&&
it
.
scopeRegEx
.
any
{
it
matches
bufferName
}
}.
filter
{
}.
filter
{
val
content
=
if
(
it
.
type
==
IgnoreType
.
MessageIgnore
)
msgContents
else
msgSender
val
content
=
if
(
it
.
type
==
IgnoreType
.
MessageIgnore
)
msgContents
else
msgSender
!
it
.
isRegEx
&&
it
.
regEx
.
matches
(
content
)
||
!
it
.
isRegEx
&&
it
.
regEx
?
.
matches
(
content
)
==
true
||
it
.
isRegEx
&&
it
.
regEx
.
containsMatchIn
(
content
)
it
.
isRegEx
&&
it
.
regEx
?
.
containsMatchIn
(
content
)
==
true
}.
map
{
}.
map
{
it
.
strictness
it
.
strictness
}.
sortedByDescending
{
}.
sortedByDescending
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment