* VRFS-726 - don't care if ftue has succeeded before; we care if there are any good devices

This commit is contained in:
Seth Call 2014-03-01 08:58:42 -06:00
parent 1e55b4acc8
commit 7a820e7827
7 changed files with 831 additions and 802 deletions

View File

@ -117,7 +117,7 @@
evt.preventDefault();
// If user hasn't completed FTUE - do so now.
if (!(context.jamClient.FTUEGetStatus())) {
if (!(context.JK.hasOneConfiguredDevice())) {
app.afterFtue = function() { submitForm(evt); };
app.layout.startNewFtue();
return;

View File

@ -136,6 +136,10 @@
return {latencyknown:true, latency:5}
}
function FTUEGetGoodConfigurationList() {
return ['a']
}
function RegisterVolChangeCallBack(functionName) {
dbg('RegisterVolChangeCallBack');
}
@ -659,6 +663,7 @@
this.FTUESetStatus = FTUESetStatus;
this.FTUEStartLatency = FTUEStartLatency;
this.FTUEGetExpectedLatency = FTUEGetExpectedLatency;
this.FTUEGetGoodConfigurationList = FTUEGetGoodConfigurationList;
// Session
this.SessionAddTrack = SessionAddTrack;

View File

@ -396,13 +396,6 @@
return;
}
// If link requires FTUE, show that first.
if ($currentTarget.hasClass("requires-ftue")) {
if (!(context.jamClient.FTUEGetStatus())) {
app.layout.showDialog('ftue');
}
}
var destination = $(evt.currentTarget).attr('layout-link');
var destinationType = $('[layout-id="' + destination + '"]').attr("layout");
if (destinationType === "screen") {

View File

@ -141,7 +141,7 @@
$('.join-link', $parentRow).click(function(evt) {
// If no FTUE, show that first.
if (!(context.jamClient.FTUEGetStatus())) {
if (!(context.JK.hasOneConfiguredDevice())) {
app.afterFtue = function() { joinClick(session.id); };
app.layout.startNewFtue();
return;

File diff suppressed because it is too large Load Diff

View File

@ -141,10 +141,12 @@ MusicSessionManager < BaseManager
raise PermissionError, "you do not own this connection"
end
recordingId = nil
ConnectionManager.new.leave_music_session(user, connection, music_session) do
recording = music_session.stop_recording # stop any ongoing recording, if there is one
recordingId = recording.id unless recording.nil?
Notification.send_session_depart(music_session, connection.client_id, user, recordingId)
end
Notification.send_session_depart(music_session, connection.client_id, user, recordingId)
end
end

View File

@ -343,6 +343,10 @@ module JamWebsockets
client_context = @client_lookup[cid]
self.cleanup_client(client_context.client) unless client_context.nil?
music_session = nil
recordingId = nil
user = nil
# remove this connection from the database
ConnectionManager.active_record_transaction do |mgr|
mgr.delete_connection(cid) { |conn, count, music_session_id, user_id|
@ -351,9 +355,10 @@ module JamWebsockets
user = User.find_by_id(user_id) unless user_id.nil?
recording = music_session.stop_recording unless music_session.nil? # stop any ongoing recording, if there is one
recordingId = recording.id unless recording.nil?
Notification.send_session_depart(music_session, cid, user, recordingId) unless music_session.nil? || user.nil?
}
end
Notification.send_session_depart(music_session, cid, user, recordingId) unless music_session.nil? || user.nil?
end
end
@ -475,6 +480,10 @@ module JamWebsockets
music_session_upon_reentry = connection.music_session
send_depart = false
recordingId = nil
context = nil
ConnectionManager.active_record_transaction do |connection_manager|
music_session_id, reconnected = connection_manager.reconnect(connection, reconnect_music_session_id, remote_ip)
context = @client_lookup[client_id]
@ -484,7 +493,7 @@ module JamWebsockets
unless context.nil? || music_session_upon_reentry.nil? || music_session_upon_reentry.destroyed?
recording = music_session_upon_reentry.stop_recording
recordingId = recording.id unless recording.nil?
Notification.send_session_depart(music_session_upon_reentry, client.client_id, context.user, recordingId)
send_depart = true
end
else
music_session = MusicSession.find_by_id(music_session_id)
@ -492,6 +501,10 @@ module JamWebsockets
end
end if connection.stale?
if send_depart
Notification.send_session_depart(music_session_upon_reentry, client.client_id, context.user, recordingId)
end
end
# respond with LOGIN_ACK to let client know it was successful