Skip to content

Commit 9dcd71f

Browse files
swolchokfacebook-github-bot
authored andcommitted
Disable animation in hot path of iOS example again (#5821)
Summary: Pull Request resolved: #5821 D62675017 put the animations back after D62308551 removed them, presumably due to a bad rebase. Reviewed By: kirklandsign Differential Revision: D63774734 fbshipit-source-id: d3b6199346ca44ccc08ab5062f099314ce4298f5
1 parent c10c96a commit 9dcd71f

File tree

1 file changed

+10
-14
lines changed

1 file changed

+10
-14
lines changed

examples/demo-apps/apple_ios/LLaMA/LLaMA/Application/ContentView.swift

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -402,13 +402,11 @@ struct ContentView: View {
402402
let count = tokens.count
403403
tokens = []
404404
DispatchQueue.main.async {
405-
withAnimation {
406-
var message = messages.removeLast()
407-
message.text += text
408-
message.tokenCount += count
409-
message.dateUpdated = Date()
410-
messages.append(message)
411-
}
405+
var message = messages.removeLast()
406+
message.text += text
407+
message.tokenCount += count
408+
message.dateUpdated = Date()
409+
messages.append(message)
412410
}
413411
}
414412
if shouldStopGenerating {
@@ -435,13 +433,11 @@ struct ContentView: View {
435433
let count = tokens.count
436434
tokens = []
437435
DispatchQueue.main.async {
438-
withAnimation {
439-
var message = messages.removeLast()
440-
message.text += text
441-
message.tokenCount += count
442-
message.dateUpdated = Date()
443-
messages.append(message)
444-
}
436+
var message = messages.removeLast()
437+
message.text += text
438+
message.tokenCount += count
439+
message.dateUpdated = Date()
440+
messages.append(message)
445441
}
446442
}
447443
if shouldStopGenerating {

0 commit comments

Comments
 (0)