 		bookSelectionTableView.dataSource = self
 		bookSelectionTableView.delegate = self
 		
+		var projectFound = false
 		do
 		{
 			if let projectId = Session.instance.projectId, let project = try Project.get(projectId)
 			{
 				targetTranslations = try project.targetTranslationQuery().resultObjects()
+				projectFound = true
 			}
 		}
 		catch
 		{
 			print("ERROR: Failed to read target translation data. \(error)")
+		}
+		
+		canHost = projectFound || P2PHostSession.instance != nil
+		canJoin = QRCodeReader.isAvailable()
+		
+		if !canHost
+		{
+			connectionSegmentedControl.removeSegment(at: 2, animated: false)
+		}
+		if !canJoin
+		{
+			connectionSegmentedControl.removeSegment(at: 1, animated: false)
 		}
 		
 		updateStatus()

import QRCodeReader
import MessageUI

@IBDesignable class ConnectionUIView: CustomXibView, QRCodeReaderViewControllerDelegate, UITableViewDataSource, UITableViewDelegate, MFMailComposeViewControllerDelegate, ConnectionListener
{
	// OUTLETS	--------------

			
			if P2PClientSession.isConnected
			{
				selectConnectionState(.joined)
				onlineStatusView.isHidden = false
			}
			else
			{
				onlineStatusView.isHidden = true
				
				if joining
				{
					selectConnectionState(.joined, isProcessing: true)
				}
				else
				{
					selectConnectionState(.disconnected)
				}
			}
		}
		
