Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
frama-c
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pub
frama-c
Commits
4fdf23b3
Commit
4fdf23b3
authored
9 months ago
by
Remi Lazarini
Browse files
Options
Downloads
Patches
Plain Diff
[ivette] fix bufferController notify
parent
0a68dfa2
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
ivette/src/dome/renderer/layout/forms.tsx
+10
-1
10 additions, 1 deletion
ivette/src/dome/renderer/layout/forms.tsx
with
10 additions
and
1 deletion
ivette/src/dome/renderer/layout/forms.tsx
+
10
−
1
View file @
4fdf23b3
...
@@ -155,6 +155,7 @@ export type BufferCallback = () => void;
...
@@ -155,6 +155,7 @@ export type BufferCallback = () => void;
export
class
BufferController
{
export
class
BufferController
{
private
readonly
evt
=
new
Events
();
private
readonly
evt
=
new
Events
();
private
errors
=
0
;
private
errors
=
0
;
private
notified
=
false
;
/** Notify all reset listener events. */
/** Notify all reset listener events. */
reset
():
void
{
this
.
evt
.
emit
(
'
reset
'
);
}
reset
():
void
{
this
.
evt
.
emit
(
'
reset
'
);
}
...
@@ -168,6 +169,9 @@ export class BufferController {
...
@@ -168,6 +169,9 @@ export class BufferController {
/** There are active listeners for Commit event. */
/** There are active listeners for Commit event. */
hasCommit
():
boolean
{
return
this
.
evt
.
listenerCount
(
'
commit
'
)
>
0
;
}
hasCommit
():
boolean
{
return
this
.
evt
.
listenerCount
(
'
commit
'
)
>
0
;
}
/** Reset notified to false. */
resetNotified
():
void
{
this
.
notified
=
false
;
}
/** Get the number of errors */
/** Get the number of errors */
getErrors
():
number
{
return
this
.
errors
;
}
getErrors
():
number
{
return
this
.
errors
;
}
...
@@ -178,7 +182,12 @@ export class BufferController {
...
@@ -178,7 +182,12 @@ export class BufferController {
}
}
/** @internal */
/** @internal */
protected
notify
():
void
{
this
.
evt
.
emit
(
'
update
'
);
}
protected
notify
():
void
{
if
(
!
this
.
notified
)
{
this
.
evt
.
emit
(
'
update
'
);
this
.
notified
=
true
;
}
}
/** @internal */
/** @internal */
onChange
(
fn
:
BufferCallback
):
void
{
this
.
evt
.
addListener
(
'
update
'
,
fn
);
}
onChange
(
fn
:
BufferCallback
):
void
{
this
.
evt
.
addListener
(
'
update
'
,
fn
);
}
...
...
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